From a4723d5022efe86c9a2341529535e287e0754634 Mon Sep 17 00:00:00 2001 From: Jun Wei Woon Date: Tue, 7 Jul 2020 20:31:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=93=20Added=20Tutorial=20template,=20M?= =?UTF-8?q?odified=20posts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archetypes/tutorial.md | 38 +++++++++++++++++++++++++++ content/en/posts/directory_cleanup.md | 2 +- content/en/posts/nbs.md | 6 +++-- 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 archetypes/tutorial.md diff --git a/archetypes/tutorial.md b/archetypes/tutorial.md new file mode 100644 index 0000000..72fafe7 --- /dev/null +++ b/archetypes/tutorial.md @@ -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 +<++> diff --git a/content/en/posts/directory_cleanup.md b/content/en/posts/directory_cleanup.md index 5cda954..fa5f6ff 100644 --- a/content/en/posts/directory_cleanup.md +++ b/content/en/posts/directory_cleanup.md @@ -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 diff --git a/content/en/posts/nbs.md b/content/en/posts/nbs.md index 22c0523..11587de 100644 --- a/content/en/posts/nbs.md +++ b/content/en/posts/nbs.md @@ -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