From 1056007740932141e274b87177748f2b07735aa0 Mon Sep 17 00:00:00 2001 From: iamwatchdogs Date: Thu, 6 Mar 2025 16:24:50 +0000 Subject: [PATCH 1/3] Removed unwanted bash scripts --- tools/run.sh | 54 ------------------------------- tools/test.sh | 89 --------------------------------------------------- 2 files changed, 143 deletions(-) delete mode 100755 tools/run.sh delete mode 100755 tools/test.sh diff --git a/tools/run.sh b/tools/run.sh deleted file mode 100755 index 0efc452..0000000 --- a/tools/run.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash -# -# Run jekyll serve and then launch the site - -prod=false -command="bundle exec jekyll s -l" -host="127.0.0.1" - -help() { - echo "Usage:" - echo - echo " bash /path/to/run [options]" - echo - echo "Options:" - echo " -H, --host [HOST] Host to bind to." - echo " -p, --production Run Jekyll in 'production' mode." - echo " -h, --help Print this help information." -} - -while (($#)); do - opt="$1" - case $opt in - -H | --host) - host="$2" - shift 2 - ;; - -p | --production) - prod=true - shift - ;; - -h | --help) - help - exit 0 - ;; - *) - echo -e "> Unknown option: '$opt'\n" - help - exit 1 - ;; - esac -done - -command="$command -H $host" - -if $prod; then - command="JEKYLL_ENV=production $command" -fi - -if [ -e /proc/1/cgroup ] && grep -q docker /proc/1/cgroup; then - command="$command --force_polling" -fi - -echo -e "\n> $command\n" -eval "$command" diff --git a/tools/test.sh b/tools/test.sh deleted file mode 100755 index 331de1c..0000000 --- a/tools/test.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env bash -# -# Build and test the site content -# -# Requirement: html-proofer, jekyll -# -# Usage: See help information - -set -eu - -SITE_DIR="_site" - -_config="_config.yml" - -_baseurl="" - -help() { - echo "Build and test the site content" - echo - echo "Usage:" - echo - echo " bash $0 [options]" - echo - echo "Options:" - echo ' -c, --config "" Specify config file(s)' - echo " -h, --help Print this information." -} - -read_baseurl() { - if [[ $_config == *","* ]]; then - # multiple config - IFS="," - read -ra config_array <<<"$_config" - - # reverse loop the config files - for ((i = ${#config_array[@]} - 1; i >= 0; i--)); do - _tmp_baseurl="$(grep '^baseurl:' "${config_array[i]}" | sed "s/.*: *//;s/['\"]//g;s/#.*//")" - - if [[ -n $_tmp_baseurl ]]; then - _baseurl="$_tmp_baseurl" - break - fi - done - - else - # single config - _baseurl="$(grep '^baseurl:' "$_config" | sed "s/.*: *//;s/['\"]//g;s/#.*//")" - fi -} - -main() { - # clean up - if [[ -d $SITE_DIR ]]; then - rm -rf "$SITE_DIR" - fi - - read_baseurl - - # build - JEKYLL_ENV=production bundle exec jekyll b \ - -d "$SITE_DIR$_baseurl" -c "$_config" - - # test - bundle exec htmlproofer "$SITE_DIR" \ - --disable-external \ - --ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/" -} - -while (($#)); do - opt="$1" - case $opt in - -c | --config) - _config="$2" - shift - shift - ;; - -h | --help) - help - exit 0 - ;; - *) - # unknown option - help - exit 1 - ;; - esac -done - -main From 6270ca6feefea156daf5e1379cd76ef39f509319 Mon Sep 17 00:00:00 2001 From: iamwatchdogs Date: Thu, 6 Mar 2025 16:25:27 +0000 Subject: [PATCH 2/3] Updated default shell to zshell for dev containers --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5387630..39c428d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,7 +6,7 @@ "customizations": { "vscode": { "settings": { - "terminal.integrated.defaultProfile.linux": "bash" + "terminal.integrated.defaultProfile.linux": "zsh" }, "extensions": [ // Liquid tags auto-complete From 09774b49ae9a47bf9148b7d06ffa2ca8423d4c69 Mon Sep 17 00:00:00 2001 From: iamwatchdogs Date: Thu, 6 Mar 2025 16:26:00 +0000 Subject: [PATCH 3/3] Updated README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9166c36..46cb3e5 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Welcome to **Notebook**, an open-source project designed with beginners in mind! Notebook is all about creating a friendly and supportive environment for developers of all levels. Whether you're just starting your coding journey or you're an experienced pro, there's a place for you here. -With Notebook, you can easily contribute to technical content and gain valuable experience in the world of open source. Our blog-like platform, built on GitHub's [Jekyll](https://jekyllrb.com/ "visit offical jekyll website") framework and adorned with the user-friendly [Chirpy](https://github.com/cotes2020/jekyll-theme-chirpy "goto chripy offical repo")theme, makes it a breeze to share your knowledge and learn from others. **It's a win-win situation:** beginners learn from the insightful posts by contributors, while contributors get the satisfaction of helping others on their coding journey. Join us at Notebook and let's learn and grow together! +With Notebook, you can easily contribute to technical content and gain valuable experience in the world of open source. Our blog-like platform, built on GitHub's [Jekyll](https://jekyllrb.com/ "visit offical jekyll website") framework and adorned with the user-friendly [Chirpy](https://github.com/cotes2020/jekyll-theme-chirpy "goto chripy offical repo") theme, makes it a breeze to share your knowledge and learn from others. **It's a win-win situation:** beginners learn from the insightful posts by contributors, while contributors get the satisfaction of helping others on their coding journey. Join us at Notebook and let's learn and grow together!