📓 Added Tutorial template, Modified posts

This commit is contained in:
Jun Wei Woon 2020-07-07 20:31:09 +08:00
parent 592820e7fd
commit a4723d5022
3 changed files with 43 additions and 3 deletions

38
archetypes/tutorial.md Normal file
View File

@ -0,0 +1,38 @@
---
author: "Devoalda"
authorEmoji: 🐺
title: "<++> - {{ replace .Name "-" " " | title }}"
date: {{ .Date }}
description: <++>
draft: false
hideToc: false
enableToc: true
enableTocContent: true
tocPosition: inner
tocLevels: ["h1", "h2", "h3"]
tags:
-
series:
-
categories:
-
image:
---
# Introduction
<++>
## Why
<++>
# Code
<++>
## Introduction
<++>
# Summary
<++>
## Full Code
<++>

View File

@ -39,7 +39,7 @@ __DO NOT__ run the script on any directory containing system/important files.
# Dependencies
* [Python3.8](https://www.python.org/)
## Code
# Code
## Imports
This is a python script, we will be using modules [os](https://docs.python.org/3/library/shutil.html) and [shutil](https://docs.python.org/3/library/shutil.html). First of all, create a new script called script.py, and import the modules required for this

View File

@ -117,6 +117,8 @@ With this script, you will be able to create a new bash script from your termina
$ nbs newscript
```
## Full Code
{{< tabs nbs bash_template >}}
{{< tab >}}
@ -153,7 +155,7 @@ $ nbs newscript
# Fixing Errors
### $PATH
## $PATH
Ensure that `$HOME/.local/bin/` is in your $PATH. If unsure, add the following lines to your `~/.bashrc` or `~/.zshrc`
``` bash
# Adds `~/.local/bin` and containing folders to $PATH
@ -166,7 +168,7 @@ done
```
This recursively adds `$HOME/.local/bin` and containing folders to $PATH.
### Permissions
## Permissions
Ensure that nbs is executable
``` bash
$ chmod +x $HOME/.local/bin/nbs