From 675fffc6fe7c7bac846a5aaafa8b24316b2d91b0 Mon Sep 17 00:00:00 2001 From: Daniel Macuare Date: Thu, 30 Oct 2025 16:16:20 +0100 Subject: [PATCH 1/7] Upgrading to v7.4.1: - Resolving conflicts --- .devcontainer/devcontainer.json | 29 ++++++++++ .devcontainer/post-create.sh | 18 ++++++ .github/workflows/pages-deploy.yml | 18 +++--- .gitignore | 7 ++- .vscode/extensions.json | 3 + .vscode/settings.json | 30 ++++++++++ .vscode/tasks.json | 26 +++++++++ Gemfile | 20 +------ README.md | 17 +----- _config.yml | 44 ++++++++------- _data/contact.yml | 16 +----- _data/share.yml | 3 +- _posts/.placeholder | 1 + _tabs/archives.md | 5 ++ assets/lib | 2 +- tools/run.sh | 54 ++++++++++++++++++ tools/test.sh | 89 ++++++++++++++++++++++++++++++ 17 files changed, 303 insertions(+), 79 deletions(-) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/post-create.sh create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json create mode 100644 _posts/.placeholder create mode 100644 _tabs/archives.md create mode 100755 tools/run.sh create mode 100755 tools/test.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..39c428d --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,29 @@ +{ + "name": "Jekyll", + "image": "mcr.microsoft.com/devcontainers/jekyll:2-bullseye", + "onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}", + "postCreateCommand": "bash .devcontainer/post-create.sh", + "customizations": { + "vscode": { + "settings": { + "terminal.integrated.defaultProfile.linux": "zsh" + }, + "extensions": [ + // Liquid tags auto-complete + "killalau.vscode-liquid-snippets", + // Liquid syntax highlighting and formatting + "Shopify.theme-check-vscode", + // Shell + "timonwong.shellcheck", + "mkhl.shfmt", + // Common formatter + "EditorConfig.EditorConfig", + "esbenp.prettier-vscode", + "stylelint.vscode-stylelint", + "yzhang.markdown-all-in-one", + // Git + "mhutchie.git-graph" + ] + } + } +} diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh new file mode 100644 index 0000000..a4bc282 --- /dev/null +++ b/.devcontainer/post-create.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +if [ -f package.json ]; then + bash -i -c "nvm install --lts && nvm install-latest-npm" + npm i + npm run build +fi + +# Install dependencies for shfmt extension +curl -sS https://webi.sh/shfmt | sh &>/dev/null + +# Add OMZ plugins +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting +git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions +sed -i -E "s/^(plugins=\()(git)(\))/\1\2 zsh-syntax-highlighting zsh-autosuggestions\3/" ~/.zshrc + +# Avoid git log use less +echo -e "\nunset LESS" >>~/.zshrc diff --git a/.github/workflows/pages-deploy.yml b/.github/workflows/pages-deploy.yml index 9a1d5a3..cc28f99 100644 --- a/.github/workflows/pages-deploy.yml +++ b/.github/workflows/pages-deploy.yml @@ -2,8 +2,8 @@ name: "Build and Deploy" on: push: branches: - - prod - #- main # Possible Issue: https://github.com/cotes2020/jekyll-theme-chirpy/issues/502#issuecomment-1060960024 + - main + - master paths-ignore: - .gitignore - README.md @@ -28,7 +28,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 # submodules: true @@ -37,12 +37,12 @@ jobs: - name: Setup Pages id: pages - uses: actions/configure-pages@v3 + uses: actions/configure-pages@v4 - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3 # reads from a '.ruby-version' or '.tools-version' file if 'ruby-version' is omitted + ruby-version: 3.3 bundler-cache: true - name: Build site @@ -52,10 +52,12 @@ jobs: - name: Test site run: | - bundle exec htmlproofer _site --disable-external --check-html --allow_hash_href + bundle exec htmlproofer _site \ + \-\-disable-external \ + \-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/" - name: Upload site artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 with: path: "_site${{ steps.pages.outputs.base_path }}" @@ -68,4 +70,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index 6276582..8bfd2a5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ Gemfile.lock # Jekyll cache .jekyll-cache +.jekyll-metadata _site # Ruby @@ -17,9 +18,13 @@ package-lock.json # IDE configurations .idea -.vscode +.vscode/* +!.vscode/settings.json +!.vscode/extensions.json +!.vscode/tasks.json # Misc +_sass/vendors assets/js/dist _drafts/* .DS_Store* diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..082bc94 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["ms-vscode-remote.remote-containers"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5e8a04f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,30 @@ +{ + // Prettier + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true, + // Shopify Liquid + "files.associations": { + "*.html": "liquid" + }, + "[markdown]": { + "editor.defaultFormatter": "yzhang.markdown-all-in-one" + }, + // Formatter + "[html][liquid]": { + "editor.defaultFormatter": "Shopify.theme-check-vscode" + }, + "[shellscript]": { + "editor.defaultFormatter": "mkhl.shfmt" + }, + // Disable vscode built-in stylelint + "css.validate": false, + "scss.validate": false, + "less.validate": false, + // Stylint extension settings + "stylelint.snippet": ["css", "scss"], + "stylelint.validate": ["css", "scss"], + // Run tasks in macOS + "terminal.integrated.profiles.osx": { + "zsh": { "path": "/bin/zsh", "args": ["-l", "-i"] } + } +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..7f0fdb8 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,26 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Run Jekyll Server", + "type": "shell", + "command": "./tools/run.sh", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [], + "detail": "Runs the Jekyll server with live reload." + }, + { + "label": "Build Jekyll Site", + "type": "shell", + "command": "./tools/test.sh", + "group": { + "kind": "build" + }, + "problemMatcher": [], + "detail": "Build the Jekyll site for production." + } + ] +} diff --git a/Gemfile b/Gemfile index 7116282..8502018 100644 --- a/Gemfile +++ b/Gemfile @@ -2,27 +2,13 @@ source "https://rubygems.org" -gem "jekyll-theme-chirpy", "~> 6.2" +gem "jekyll-theme-chirpy", "~> 7.4", ">= 7.4.1" -group :test do - gem "html-proofer", "~> 3.18" -end +gem "html-proofer", "~> 5.0", group: :test -# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem -# and associated library. platforms :mingw, :x64_mingw, :mswin, :jruby do gem "tzinfo", ">= 1", "< 3" gem "tzinfo-data" end -# Performance-booster for watching directories on Windows -gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] - -# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem -# do not have a Java counterpart. -gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] - -# Lock jekyll-sass-converter to 2.x on Linux-musl -if RUBY_PLATFORM =~ /linux-musl/ - gem "jekyll-sass-converter", "~> 2.0" -end +gem "wdm", "~> 0.2.0", :platforms => [:mingw, :x64_mingw, :mswin] diff --git a/README.md b/README.md index 600dca1..1a57fa3 100644 --- a/README.md +++ b/README.md @@ -20,23 +20,13 @@ To fully use all the features of **Chirpy**, you need to copy the other critical To save you time, and also in case you lose some files while copying, we extract those files/configurations of the latest version of the **Chirpy** theme and the [CD][CD] workflow to here, so that you can start writing in minutes. -## Prerequisites - -Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of the basic environment. [Git](https://git-scm.com/) also needs to be installed. - -## Installation - -Sign in to GitHub and [**use this template**][use-template] to generate a brand new repository and name it `USERNAME.github.io`, where `USERNAME` represents your GitHub username. - -Then clone it to your local machine and run: +## Usage -``` +```console $ bundle ``` -## Usage - -Please see the [theme's docs](https://github.com/cotes2020/jekyll-theme-chirpy#documentation). +Check out the [theme's docs](https://github.com/cotes2020/jekyll-theme-chirpy/wiki). ## License @@ -44,6 +34,5 @@ This work is published under [MIT][mit] License. [gem]: https://rubygems.org/gems/jekyll-theme-chirpy [chirpy]: https://github.com/cotes2020/jekyll-theme-chirpy/ -[use-template]: https://github.com/cotes2020/chirpy-starter/generate [CD]: https://en.wikipedia.org/wiki/Continuous_deployment [mit]: https://github.com/cotes2020/chirpy-starter/blob/master/LICENSE diff --git a/_config.yml b/_config.yml index 26df144..a337135 100644 --- a/_config.yml +++ b/_config.yml @@ -5,7 +5,8 @@ baseurl: "" lang: en -timezone: "Europe/London" +# Change to your timezone › https://zones.arilyn.cc +timezone: "Europe/Madrid" # jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md # ↓ -------------------------- @@ -34,13 +35,20 @@ social: - https://twitter.com/techdmac - https://github.com/danielmacuare -google_site_verification: +webmaster_verifications: + google: # fill in your Google verification code + bing: # fill in your Bing verification code + alexa: # fill in your Alexa verification code + yandex: # fill in your Yandex verification code + baidu: # fill in your Baidu verification code + facebook: # fill in your Facebook verification code # ↑ -------------------------- # The end of `jekyll-seo-tag` settings -google_analytics: - id: "G-XKDS3E28YE" # Google Analytics Measurement ID +analytics: + google: + id: "G-XKDS3E28YE" # Google Analytics Measurement ID theme_mode: # System color by default @@ -49,7 +57,7 @@ theme_mode: # System color by default # will be added to all image (site avatar & posts' images) paths starting with '/' # # e.g. 'https://cdn.com' -img_cdn: +cdn: # the avatar on sidebar, support local or CORS resources avatar: assets/img/avatar/dmac_logo_black_bg.png @@ -57,8 +65,9 @@ avatar: assets/img/avatar/dmac_logo_black_bg.png toc: true comments: - active: # The global switch for posts comments, e.g., 'disqus'. Keep it empty means disable - # The active options are as follows: + # Global switch for the post-comment system. Keeping it empty means disabled. + provider: # [disqus | utterances | giscus] + # The provider options are as follows: disqus: shortname: # fill with the Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname # utterances settings › https://utteranc.es/ @@ -82,7 +91,7 @@ assets: enabled: # boolean, keep empty means false # specify the Jekyll environment, empty means both # only works if `assets.self_host.enabled` is 'true' - env: # [development|production] + env: # [development | production] pwa: enabled: true # the option for PWA feature @@ -92,6 +101,7 @@ paginate: 10 # ------------ The following options are not recommended to be modified ------------------ kramdown: + footnote_backlink: "↩︎" syntax_highlighter: rouge syntax_highlighter_opts: # Rouge Options › https://github.com/jneen/rouge#full-options css_class: highlight @@ -128,14 +138,6 @@ defaults: values: layout: page permalink: /:title/ - - scope: - path: assets/img/favicons - values: - swcache: true - - scope: - path: assets/js/dist - values: - swcache: true sass: style: compressed @@ -152,13 +154,13 @@ compress_html: exclude: - "*.gem" - "*.gemspec" + - docs - tools - README.md - - CHANGELOG.md - LICENSE - - rollup.config.js - - node_modules - - package*.json + - purgecss.js + - "*.config.js" + - "package*.json" jekyll-archives: enabled: [categories, tags] @@ -167,4 +169,4 @@ jekyll-archives: tag: tag permalinks: tag: /tags/:name/ - category: /categories/:name/ + category: /categories/:name/ \ No newline at end of file diff --git a/_data/contact.yml b/_data/contact.yml index 5a07d20..2c4163a 100644 --- a/_data/contact.yml +++ b/_data/contact.yml @@ -9,20 +9,6 @@ - type: twitter icon: "fab fa-twitter" -#- type: email -# icon: "fas fa-envelope" -# noblank: true # open link in current tab - - type: rss icon: "fas fa-rss" - noblank: true -# Uncomment and complete the url below to enable more contact options -# -# - type: mastodon -# icon: 'fab fa-mastodon' # icons powered by -# url: '' # Fill with your Mastodon account page, rel="me" will be applied for verification -# -# -# - type: stack-overflow -# icon: 'fab fa-stack-overflow' -# url: '' # Fill with your stackoverflow homepage + noblank: true \ No newline at end of file diff --git a/_data/share.yml b/_data/share.yml index 55a5569..a70180b 100644 --- a/_data/share.yml +++ b/_data/share.yml @@ -2,8 +2,7 @@ # Icons from platforms: - - type: Linkedin - icon: "fab fa-linkedin" + - type: Linkedin icon: "fab fa-linkedin" link: "https://www.linkedin.com/sharing/share-offsite/?url=URL" - type: Twitter diff --git a/_posts/.placeholder b/_posts/.placeholder new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/_posts/.placeholder @@ -0,0 +1 @@ + diff --git a/_tabs/archives.md b/_tabs/archives.md new file mode 100644 index 0000000..c3abc59 --- /dev/null +++ b/_tabs/archives.md @@ -0,0 +1,5 @@ +--- +layout: archives +icon: fas fa-archive +order: 3 +--- diff --git a/assets/lib b/assets/lib index 24ebdb7..93e0345 160000 --- a/assets/lib +++ b/assets/lib @@ -1 +1 @@ -Subproject commit 24ebdb708f3f5451df953cb5f9deb3ad4433404a +Subproject commit 93e03454edf879bdf8abe34b9715b9fea4da0ee8 diff --git a/tools/run.sh b/tools/run.sh new file mode 100755 index 0000000..0efc452 --- /dev/null +++ b/tools/run.sh @@ -0,0 +1,54 @@ +#!/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 new file mode 100755 index 0000000..331de1c --- /dev/null +++ b/tools/test.sh @@ -0,0 +1,89 @@ +#!/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 bf4ed332f84831f7b3c761148eda0a33bffd025b Mon Sep 17 00:00:00 2001 From: Daniel Macuare Date: Thu, 30 Oct 2025 16:19:55 +0100 Subject: [PATCH 2/7] Upgrade to v7.4.1 - Solving Gemfile conflicts --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 8502018..4489071 100644 --- a/Gemfile +++ b/Gemfile @@ -11,4 +11,4 @@ platforms :mingw, :x64_mingw, :mswin, :jruby do gem "tzinfo-data" end -gem "wdm", "~> 0.2.0", :platforms => [:mingw, :x64_mingw, :mswin] +gem "wdm", "~> 0.2.0", :platforms => [:mingw, :x64_mingw, :mswin] \ No newline at end of file From 9e113d760a1f4645e46896a464b31ccd37fe078f Mon Sep 17 00:00:00 2001 From: Daniel Macuare Date: Fri, 31 Oct 2025 12:51:41 +0100 Subject: [PATCH 3/7] Upgrading to v7.4.1: Fixing Image File Path --- ...x-highlighting-for-cisco-arista-juniper.MD | 13 +++++----- _posts/2020-09-06-boto3-code-completion.MD | 5 ++-- .../2020-09-07-what-is-network-automation.MD | 3 +-- ...etwork-automation-hell-where-do-i-start.MD | 7 +++--- ...-network-automation-why-is-it-important.MD | 9 +++---- .../2020-10-05-jncia-automation-and-devops.MD | 3 +-- _posts/2020-11-01-vagrant-101.MD | 7 +++--- ...-02-creating-our-network-automation-lab.MD | 17 ++++++------- _posts/2023-08-14-from-wordpress-to-jekyll.MD | 3 +-- ...Pv6-issues-with-python-package-managers.MD | 13 +++++----- ... managing-docker-containers-via-the-cli.MD | 25 +++++++++---------- ...23-09-18-python-typer-powerful-cli-apps.MD | 11 ++++---- 12 files changed, 52 insertions(+), 64 deletions(-) diff --git a/_posts/2020-04-02-syntax-highlighting-for-cisco-arista-juniper.MD b/_posts/2020-04-02-syntax-highlighting-for-cisco-arista-juniper.MD index 3661af5..2957bc9 100644 --- a/_posts/2020-04-02-syntax-highlighting-for-cisco-arista-juniper.MD +++ b/_posts/2020-04-02-syntax-highlighting-for-cisco-arista-juniper.MD @@ -4,9 +4,8 @@ title: Syntax Highlighting for Cisco/Arista/Juniper CLI date: 2020-04-02 10:00:00 +0100 categories: [networking] tags: [linux] -img_path: /assets/img/posts/ image: - path: "2020-04-02/img-preview.webp" + path: "/assets/img/posts/2020-04-02/img-preview.webp" --- [netcli-highlight Repo](https://github.com/danielmacuare/netcli-highlight) @@ -23,27 +22,27 @@ Next, you can see examples of the syntax highlighting: ### Reading JunOS Firewall Rules -![JunOS Security Policies](2020-04-02/fig1-junos-sec-policies.webp) +![JunOS Security Policies](/assets/img/posts/2020-04-02/fig1-junos-sec-policies.webp) _Figure 1 - JunOS Firewall Rules_ ### Reading Show ip bgp summary (Arista/Cisco) -![EOS Show ip bgp summary](2020-04-02/fig2-eos-show-ip-bgp-summary.webp) +![EOS Show ip bgp summary](/assets/img/posts/2020-04-02/fig2-eos-show-ip-bgp-summary.webp) _Figure 2 - (EOS/IOS) show ip bgp summary_ ### Show interfaces (Arista/Cisco/Juniper) -![show interfaces](2020-04-02/fig3-ios-show-interfaces.webp) +![show interfaces](/assets/img/posts/2020-04-02/fig3-ios-show-interfaces.webp) _Figure 3 - (EOS/IOS) show interfaces_ ### Reading route-maps (EOS/IOS) -![show route-maps](2020-04-02/fig4-ios-show-route-maps.webp) +![show route-maps](/assets/img/posts/2020-04-02/fig4-ios-show-route-maps.webp) _Figure 4 - (EOS/IOS) show route-maps_ ### Reading Prefix Lists -![show prefix list](2020-04-02/fig5-ios-prefix-lists.webp) +![show prefix list](/assets/img/posts/2020-04-02/fig5-ios-prefix-lists.webp) _Figure 5 - (EOS/IOS) Prefix Lists_ ## How can I try this? diff --git a/_posts/2020-09-06-boto3-code-completion.MD b/_posts/2020-09-06-boto3-code-completion.MD index a326616..9255a5d 100644 --- a/_posts/2020-09-06-boto3-code-completion.MD +++ b/_posts/2020-09-06-boto3-code-completion.MD @@ -4,15 +4,14 @@ title: How to enable code-completion in VScode for Boto3? date: 2020-09-06 10:00:00 +0100 categories: [cloud] tags: [python, aws, vscode] -img_path: /assets/img/posts/ image: - path: "2020-09-06/img-preview.webp" + path: "/assets/img/posts/2020-09-06/img-preview.webp" --- While working with AWS [boto3](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2/client/create_transit_gateway_vpc_attachment.html#) I found myself constantly jumping to the AWS documentation to look for the methods I needed. I wondered if there was any code-completion for it instead? -![VsCode Boto3](2020-09-06/boto3-vscode-syntax-highlighting.webp)_Figure 1 - Boto3 Code-Completion in VSCode_ +![VsCode Boto3](/assets/img/posts/2020-09-06/boto3-vscode-syntax-highlighting.webp)_Figure 1 - Boto3 Code-Completion in VSCode_ Yes, there was a package called botostubs to do just this and enable code-completion for boto3. diff --git a/_posts/2020-09-07-what-is-network-automation.MD b/_posts/2020-09-07-what-is-network-automation.MD index 5e1a54c..d93ab62 100644 --- a/_posts/2020-09-07-what-is-network-automation.MD +++ b/_posts/2020-09-07-what-is-network-automation.MD @@ -4,9 +4,8 @@ title: What is Network Automation? date: 2020-09-07 10:00:00 +0100 categories: [networking] tags: [automation] -img_path: /assets/img/posts/ image: - path: "2020-09-07/img-preview.webp" + path: "/assets/img/posts/2020-09-07/img-preview.webp" --- ## What is Network Automation? diff --git a/_posts/2020-09-14-network-automation-hell-where-do-i-start.MD b/_posts/2020-09-14-network-automation-hell-where-do-i-start.MD index 9d1351c..8abde98 100644 --- a/_posts/2020-09-14-network-automation-hell-where-do-i-start.MD +++ b/_posts/2020-09-14-network-automation-hell-where-do-i-start.MD @@ -4,9 +4,8 @@ title: Network Automation Hell - Where do I start? date: 2020-09-14 10:00:00 +0100 categories: [networking] tags: [automation] -img_path: /assets/img/posts/ image: - path: "2020-09-14/img-preview.webp" + path: "/assets/img/posts/2020-09-14/img-preview.webp" --- ## Network Automation Hell - Where do I start? @@ -15,7 +14,7 @@ It’s impossible to deny that Network automation is now more than and trendy bu While browsing YouTube you can find some videos talking about Ansible, Pipelines, Python, Frameworks, APIs, Git, Jenkins, Batfish, etc… And the list just goes on and on. This is what I like to call the Automation hell and we want to avoid the FOMO (fear of missing out) when we are just starting our journey. -![Network Automation Tools](2020-09-14/img-preview.webp) +![Network Automation Tools](/assets/img/posts/2020-09-14/img-preview.webp) _Figure 1 - Some Network Automation Tools_ Let’s start with the most common question and the one that you are thinking of right NOW (I know, you must be thinking… is this guy a mind reader or what??)… Where do I start?. @@ -44,7 +43,7 @@ This guy is the Rockstar of the Python world for newcomers. Make sure to check o This site is fantastic! The explanations are great, filled with visualisations and code snippets. Although some content is paid, you can find a long and in-depth how-to about Python for Free. The Requests package in Python is commonly used to query APIs. You can see a great article about it by clicking in the logo at your right. -[![Real Python](2020-09-14/real-python-logo.webp){: w="900" h="600" }](https://realpython.com/){:target="_blank"} +[![Real Python](/assets/img/posts/2020-09-14/real-python-logo.webp){: w="900" h="600" }](https://realpython.com/){:target="_blank"}

Dmitry Figol’s Streams

Dmitry is one of the maintainers of the nornir python package, and he constantly streams about Network Automation topics. These are long streams, but the amount of things you can learn from those streams is incredible. I’m shocked that this guy only has 4.5K subs in his Youtube channel. If you go through his videos, you will see him learning and his thought process when learning about new topics. diff --git a/_posts/2020-09-21-network-automation-why-is-it-important.MD b/_posts/2020-09-21-network-automation-why-is-it-important.MD index 6bfb2ca..a1e375f 100644 --- a/_posts/2020-09-21-network-automation-why-is-it-important.MD +++ b/_posts/2020-09-21-network-automation-why-is-it-important.MD @@ -4,9 +4,8 @@ title: Network Automation - Why is it important? date: 2020-09-21 10:00:00 +0100 categories: [networking] tags: [automation] -img_path: /assets/img/posts/ image: - path: "2020-09-21/img-preview.webp" + path: "/assets/img/posts/2020-09-21/img-preview.webp" --- ## Network Automation - Why is it important? @@ -25,14 +24,14 @@ Sometimes we can overestimate the scope of a change and think – “I’ve done Let’s imagine you are starting a maintenance window: Your task today is to test 4 x LACP links (2 x 100G each) in 4 different switches and make sure that traffic is not interrupted if one of the links go down. To do this, you are going to shut down one of the links, monitor for 30 minutes and then bring it back. -![Maintenance's Logical Diagram](2020-09-21/fig1-maintenance-logical-diagram.webp){: w="900" h="600" } +![Maintenance's Logical Diagram](/assets/img/posts/2020-09-21/fig1-maintenance-logical-diagram.webp){: w="900" h="600" } _Figure 1 - Maintenance's Logical Diagram_ You reach the last device, and when shutting down one of the interfaces in FRK-MX480-04, you see that traffic suddenly stops flowing to LAS-MX480-00, so you quickly roll back the change, and the problem disappears. But what happened, how could something like this have gone wrong? While investigating the root cause of the problem, we start digging into the current configs (Try and see if you can find the culprit!!): -![Maintenance's Logical Diagram](2020-09-21/fig2-maintenance-changes.webp){: w="900" h="600" } +![Maintenance's Logical Diagram](/assets/img/posts/2020-09-21/fig2-maintenance-changes.webp){: w="900" h="600" } _Figure 2 - Maintenance Changes_ In the image above, we notice that FRK-MX480-04 was configured to expect at least two links to be up to mark the AE4 interface as operational but because one of the two interfaces went down, the AE4 link was immediately marked as down and traffic stopped flowing. @@ -74,7 +73,7 @@ In the cloud market, all big players, AWS, Azure and Google cloud (The Top 3) ar Next, you can see a pretty cool map of all the regions and zones on which AWS has a presence on: -[![AWS Infrastructure Map](2020-09-21/fig3-aws-infrastrusture-map.webp){: w="900" h="600" }](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/){:target="_blank"} +[![AWS Infrastructure Map](/assets/img/posts/2020-09-21/fig3-aws-infrastrusture-map.webp){: w="900" h="600" }](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/){:target="_blank"} In this post, we have seen how automation can help you make your network more consistent and help you to deploy and troubleshoot changes with more confidence. Next, we have seen how to reduce human error by proposing some changes to your workflow, like testing your changes in a dev environment and deploying your changes systematically in favour of manual CLI changes. diff --git a/_posts/2020-10-05-jncia-automation-and-devops.MD b/_posts/2020-10-05-jncia-automation-and-devops.MD index 7e05136..16e6e78 100644 --- a/_posts/2020-10-05-jncia-automation-and-devops.MD +++ b/_posts/2020-10-05-jncia-automation-and-devops.MD @@ -4,9 +4,8 @@ title: JNCIA Automation and DevOps Exam – What you need to know date: 2020-10-05 10:00:00 +0100 categories: [networking] tags: [certs] -img_path: /assets/img/posts/ image: - path: "2020-10-05/img-preview.webp" + path: "/assets/img/posts/2020-10-05/img-preview.webp" --- I recently took the Automation and DevOps, Associate [JNCIA-DevOps JN0-221](https://www.juniper.net/gb/en/training/certification/tracks/devops/jncia-devops.html?tab=jnciadevops") exam, and below, you will find some tips based on this experience. To be more specific, I will show you: diff --git a/_posts/2020-11-01-vagrant-101.MD b/_posts/2020-11-01-vagrant-101.MD index 22665af..d8395a9 100644 --- a/_posts/2020-11-01-vagrant-101.MD +++ b/_posts/2020-11-01-vagrant-101.MD @@ -4,9 +4,8 @@ title: Vagrant 101 date: 2020-11-01 10:00:00 +0100 categories: [tools] tags: [automation, lab] -img_path: /assets/img/posts/ image: - path: "2020-11-01/img-preview.webp" + path: "/assets/img/posts/2020-11-01/img-preview.webp" --- ## Vagrant 101 @@ -29,7 +28,7 @@ From a virtualization perspective, the Host Operative System (OS) is essentially ## Vagrant Components -![Vagrant Components](2020-11-01/fig1-vagrant-components.webp){: w="900" h="600" } +![Vagrant Components](/assets/img/posts/2020-11-01/fig1-vagrant-components.webp){: w="900" h="600" } _Figure 1 - Vagrant Components_ ### Vagrantfile @@ -62,7 +61,7 @@ When you are building a VM with Vagrant in VirtualBox, by default, it configures Additionally, Vagrant creates a port forwarding rule to later ssh into the VM when you issue vagrant ssh with a random port in the Host OS. So what happens when you issue vagrant ssh is that Vagrant sends traffic to this random port in the Host OS, and those packets are then redirected to port 22 in the Guest VMs. -![Virtualbox NAT](2020-11-01/fig2-virtualbox-nat.webp){: w="900" h="600" } +![Virtualbox NAT](/assets/img/posts/2020-11-01/fig2-virtualbox-nat.webp){: w="900" h="600" } _Figure 2 - Virtualbox NAT_ ## Vagrant Useful Commands diff --git a/_posts/2020-11-02-creating-our-network-automation-lab.MD b/_posts/2020-11-02-creating-our-network-automation-lab.MD index 27e62f7..3a5c067 100644 --- a/_posts/2020-11-02-creating-our-network-automation-lab.MD +++ b/_posts/2020-11-02-creating-our-network-automation-lab.MD @@ -4,9 +4,8 @@ title: Creating our Network Automation Lab date: 2020-11-02 10:00:00 +0100 categories: [networking] tags: [automation, lab] -img_path: /assets/img/posts/ image: - path: "2020-11-02/img-preview.webp" + path: "/assets/img/posts/2020-11-02/img-preview.webp" --- One of the best ways to learn about a topic is to practice what you study, validate it, and always test your assumptions. In my opinion, there’s nothing that can substitute the hands-on experience you get by configuring and deploying your own network designs. @@ -38,13 +37,13 @@ The cool thing about Vagrant is that it abstracts all the complexity of setting At the end of this article, we will have built a Leaf-Spine topology like the following: -![Leaf-Spine-Base-Topology](2020-11-02/fig1-leaf-spine-base.webp){: w="900" h="600" } +![Leaf-Spine-Base-Topology](/assets/img/posts/2020-11-02/fig1-leaf-spine-base.webp){: w="900" h="600" } _Figure 1 - Base Leaf-Spine Topology_ -![Leaf-Spine-P2P-Names](2020-11-02/fig2-leaf-spine-p2p-names.webp){: w="900" h="600" } +![Leaf-Spine-P2P-Names](/assets/img/posts/2020-11-02/fig2-leaf-spine-p2p-names.webp){: w="900" h="600" } _Figure 2 - Leaf-Spine Topology - Point to Point Names_ -![Leaf-Spine-P2P-IPs](2020-11-02/fig3-leaf-spine-p2p-ips.webp){: w="900" h="600" } +![Leaf-Spine-P2P-IPs](/assets/img/posts/2020-11-02/fig3-leaf-spine-p2p-ips.webp){: w="900" h="600" } _Figure 3 - Leaf-Spine Topology - Point to Point IPs_ You can clone the [netlab-automation](https://github.com/danielmacuare/netlab-automation) repository and follow the instructions in this post to build a replica of this topology. @@ -63,7 +62,7 @@ server02.vm.network "private_network", virtualbox__intnet: "mgmt-network", auto_ In the snippet above, Virtualbox will provision a “Virtual Switch” (In software), and it will attach the “swp1” interfaces of each of the Cumulus VX boxes as well as the Eth1 interfaces of the servers to this switch. Next, you can see the Management network topology: -![Leaf-Spine-Management-IPs](2020-11-02/fig4-leaf-spine-management-ips.webp){: w="900" h="600" } +![Leaf-Spine-Management-IPs](/assets/img/posts/2020-11-02/fig4-leaf-spine-management-ips.webp){: w="900" h="600" } _Figure 4 - Leaf-Spine Topology - Management IPs_ > MGMT VRF: In Cumulus Linux 4.0 and later, a management VRF is enabled by default, and Vagrant attaches the interface eth0 to it for out of band management. In our case, we will additionally connect the first port (swp1), to the mgmt VRF to simulate a management network. @@ -125,12 +124,12 @@ After the setup process has finished, you can run the following command to check vagrant global-status ``` -![Vagrant-Global-Status-Output](2020-11-02/fig5-vagrant-global-status-output.webp){: w="900" h="600" } +![Vagrant-Global-Status-Output](/assets/img/posts/2020-11-02/fig5-vagrant-global-status-output.webp){: w="900" h="600" } _Figure 5 - Vagrant Global Status Output_ You can additionally open VirtualBox to check the status of your VMs. -![Virtualbox VMs List](2020-11-02/fig6-virtualbox-vms-list.webp){: w="900" h="600" } +![Virtualbox VMs List](/assets/img/posts/2020-11-02/fig6-virtualbox-vms-list.webp){: w="900" h="600" } _Figure 6 - Virtualbox VMs List_ Last, to verify management connectivity, ssh to leaf01, run LLDP (It will take some minutes for LLDP to discover all devices in the mgmt-network), and ping some other devices to ensure they are reachable. @@ -144,7 +143,7 @@ ping -I mgmt 10.2.3.200 # Automation Server ping -I mgmt 10.2.3.201 # Server 1 ``` -![Virtualbox VMs List](2020-11-02/fig7-show-lldp-output.webp){: w="900" h="600" } +![Virtualbox VMs List](/assets/img/posts/2020-11-02/fig7-show-lldp-output.webp){: w="900" h="600" } _Figure 7 - Show LLDP Command Output_ **Congratulations, we have finished the lab setup!**. In the next posts, we will be adding more features to it and start playing with VXLAN/EVPN. diff --git a/_posts/2023-08-14-from-wordpress-to-jekyll.MD b/_posts/2023-08-14-from-wordpress-to-jekyll.MD index 7defffe..125cc6f 100644 --- a/_posts/2023-08-14-from-wordpress-to-jekyll.MD +++ b/_posts/2023-08-14-from-wordpress-to-jekyll.MD @@ -4,9 +4,8 @@ title: "From Wordpress to Jekyll: The joy of blogging again." date: 2023-08-14 00:00:00 +100 categories: [tools] tags: [blogging] -img_path: /assets/img/posts/ image: - path: "2023-08-14/img-preview.webp" + path: "/assets/img/posts/2023-08-14/img-preview.webp" --- ## Starting point diff --git a/_posts/2023-08-21-IPv6-issues-with-python-package-managers.MD b/_posts/2023-08-21-IPv6-issues-with-python-package-managers.MD index 6a16c3a..abe2d75 100644 --- a/_posts/2023-08-21-IPv6-issues-with-python-package-managers.MD +++ b/_posts/2023-08-21-IPv6-issues-with-python-package-managers.MD @@ -4,9 +4,8 @@ title: "IPv6 Issues with Python Package Managers" date: 2023-08-21 00:00:00 +100 categories: [tools] tags: [python, linux] -img_path: /assets/img/posts/ image: - path: "2023-08-21/img-preview.webp" + path: "/assets/img/posts/2023-08-21/img-preview.webp" --- ## TLDR @@ -26,7 +25,7 @@ I was initially using Poetry and later switched to PIP. Although it got slightly In the next video, I'm trying to install the pre-commit package (in the top tab) and I'm measuring how long it takes by prefacing the install with the `time` command. At the very end of the video, you will see it took **1 min and 02 seconds** to only install one package. -![Python Poetry Issues](2023-08-21/issues.gif) +![Python Poetry Issues](/assets/img/posts/2023-08-21/issues.gif) _Figure 1 - Poetry: Took 61 seconds to install the pre-commit package_ ### PyPi IP Ranges @@ -47,7 +46,7 @@ brew install ripgrep jq curl -k https://api.fastly.com/public-ip-list | jq | rg --passthru '151.101|2a04:4e42' ``` -![Fastly IP Ranges](2023-08-21/fastly-ips.webp) +![Fastly IP Ranges](/assets/img/posts/2023-08-21/fastly-ips.webp) _Figure 2 - Fastly's Owned IP Ranges_ As you can see in `Figure 2`, the 2 IPs are owned by Fastly. @@ -76,7 +75,7 @@ To efficiently manage both connections (IPv4 and IPv6), an algorithm called `"Ha For this post, I'm going to use Ubuntu 22.04 to explain how to check if this is your problem and then to offer a workaround. Below, you can see info on my distro: -![Ubuntu 22.04](2023-08-21/ubuntu2204.webp) +![Ubuntu 22.04](/assets/img/posts/2023-08-21/ubuntu2204.webp) _Figure 3 - Distro Info_ ### How to check if IPv6 is enabled in your system @@ -87,7 +86,7 @@ Use the command below to check if IPv6 is enabled. If the output returns: sysctl -a 2>/dev/null | grep disable_ipv6 ``` -![IPv6 status Linux](2023-08-21/ipv6-status-linux.webp) +![IPv6 status Linux](/assets/img/posts/2023-08-21/ipv6-status-linux.webp) _Figure 4 - IPv6 Enabled (0) on all the interfaces_ - 0 - Means that IPv6 is **Enabled** @@ -134,7 +133,7 @@ poetry add rich nornir nornir_napalm pip install rich nornir nornir_napalm ``` -![Issue Fixed](2023-08-21/after-fixing-issues.gif) +![Issue Fixed](/assets/img/posts/2023-08-21/after-fixing-issues.gif) _Figure 5 - Poetry: After disabling IPv6 on ens18_ On the video above, you can see that after disabling IPv6 on the interface ens18, the time it took to install the `pre-commit` package decreased **from 61 seconds to ONLY 1 Second! :)** diff --git a/_posts/2023-09-11-ctop: managing-docker-containers-via-the-cli.MD b/_posts/2023-09-11-ctop: managing-docker-containers-via-the-cli.MD index 62f6d3d..ffad858 100644 --- a/_posts/2023-09-11-ctop: managing-docker-containers-via-the-cli.MD +++ b/_posts/2023-09-11-ctop: managing-docker-containers-via-the-cli.MD @@ -4,9 +4,8 @@ title: "ctop: Managing docker containers via the CLI" date: 2023-09-11 00:00:00 +100 categories: [tools] tags: [docker] -img_path: /assets/img/posts/ image: - path: "2023-09-11/img-preview.webp" + path: "/assets/img/posts/2023-09-11/img-preview.webp" --- If you love to work with containers, keep reading, this article will be useful for you. @@ -27,7 +26,7 @@ This got me thinking if there was a better way to manage these common tasks via ## ctop -![ctop](2023-09-11/ctop-containers.webp) +![ctop](/assets/img/posts/2023-09-11/ctop-containers.webp) _Figure 1 - Containers View using cTOP_ You can run ctop on your shell to perform all these simple tasks over your containers (Only Docker and runC container runtimes are supported at the moment): @@ -41,7 +40,7 @@ With this tool, you can quickly perform the following tasks from one single plac ## ctop in Action -![cTOP](2023-09-11/ctop-demo.gif) +![cTOP](/assets/img/posts/2023-09-11/ctop-demo.gif) _Figure 2 - cTOP - Getting Container Info, CPU, Memory, Env Vars and Logs_ ## How to install ctop @@ -73,15 +72,15 @@ docker run --rm -ti \ ## ctop Options -Option | Description ---- | --- -`-a` | show active containers only -`-f ` | set an initial filter string -`-h` | display help dialog -`-i` | invert default colors -`-r` | reverse container sort order -`-s` | select initial container sort field -`-v` | output version information and exit +| Option | Description | +| ------------- | ----------------------------------- | +| `-a` | show active containers only | +| `-f ` | set an initial filter string | +| `-h` | display help dialog | +| `-i` | invert default colors | +| `-r` | reverse container sort order | +| `-s` | select initial container sort field | +| `-v` | output version information and exit | ## ctop Keybindings diff --git a/_posts/2023-09-18-python-typer-powerful-cli-apps.MD b/_posts/2023-09-18-python-typer-powerful-cli-apps.MD index 8b6e167..c9ae993 100644 --- a/_posts/2023-09-18-python-typer-powerful-cli-apps.MD +++ b/_posts/2023-09-18-python-typer-powerful-cli-apps.MD @@ -4,9 +4,8 @@ title: "Python Typer: Powerful CLI Apps" date: 2023-09-20 00:00:00 +100 categories: [tools] tags: [python] -img_path: /assets/img/posts/ image: - path: "2023-09-20/img-preview.webp" + path: "/assets/img/posts/2023-09-20/img-preview.webp" --- ## Why Typer @@ -50,7 +49,7 @@ Next, we will see the commands that the users will be executing to get all the f ### Discover Command -![Discover Command](2023-09-20/discover.gif) +![Discover Command](/assets/img/posts/2023-09-20/discover.gif) _Figure 1 - Discover Command_ - Discover network devices on a particular subnet @@ -64,7 +63,7 @@ python main.py discover device chi-leaf-04 ### Add Command -![Add Command](2023-09-20/add.gif) +![Add Command](/assets/img/posts/2023-09-20/add.gif) _Figure 2 - Add Command_ - Add all discovered devices to Netbox @@ -80,7 +79,7 @@ python main.py add -s chi-leaf-04 ### Show Command -![Show Command](2023-09-20/show.gif) +![Show Command](/assets/img/posts/2023-09-20/show.gif) _Figure 3 - Show Command_ - Show devices and subnets available in Netbox @@ -98,7 +97,7 @@ python main.py show local subnets ### Delete Command -![Delete Command](2023-09-20/delete.gif) +![Delete Command](/assets/img/posts/2023-09-20/delete.gif) _Figure 4 - Delete Command_ - Delete all devices available in Netbox From 651dc92a68218753e37881f45cd3e5d31243fc41 Mon Sep 17 00:00:00 2001 From: Daniel Macuare Date: Fri, 31 Oct 2025 13:51:06 +0100 Subject: [PATCH 4/7] Upgrading to v7.4.1: Adding Upgrade.md --- upgrade.MD | 168 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 upgrade.MD diff --git a/upgrade.MD b/upgrade.MD new file mode 100644 index 0000000..b2bdd6b --- /dev/null +++ b/upgrade.MD @@ -0,0 +1,168 @@ +# Upgrade Guide: Jekyll Chirpy Theme + +This guide provides instructions to upgrade the Jekyll Chirpy theme from version 6.2 to the latest version, 7.4.1. + +This guide will also be used as reference on future upgrades. + +## Prerequisites + +- Git installed +- Ruby and Bundler installed + +## Upgrade Steps + +### 0. Compare the current version with latest () +Current Version: v6.2.2 +Latest Version: v7.4.1 +https://github.com/cotes2020/chirpy-starter/compare/v6.2.2...v7.4.1 + +### 1. Add the Upstream Remote + +If you haven't done so before, add the `chirpy-starter` repository as a remote to your local Git repository. + +```bash +git remote add chirpy https://github.com/cotes2020/chirpy-starter.git +``` + +To verify the remote was added successfully, run: + +```bash +git remote -v +``` + +You should see `chirpy` in the output. + +### 2. Fetch the Latest Updates + +Fetch all the tags from the upstream `chirpy` remote: + +```bash +git fetch chirpy --tags +``` + +### 3. Merge the Latest Version + +Merge the latest tag from upstream into your local branch. + +```bash +git merge v7.4.1 --squash --allow-unrelated-histories +``` + +**Note:** The `--squash` flag combines all the changes from upstream into a single commit, keeping your commit history clean. The `--allow-unrelated-histories` flag is necessary if your local branch and the upstream theme do not share a common Git history. + +### 4. Resolve Merge Conflicts + +It is common to encounter merge conflicts, especially if you have made customizations to the theme files. You will need to manually resolve these conflicts. + +- Run `git status` to see a list of unmerged files. +- Open each conflicting file in a text editor. You will see the conflicting changes marked with `<<<<<<<`, `=======`, and `>>>>>>>`. +- Edit the files to keep your changes, the theme's updates, or a combination of both. Remove the conflict markers. +- Once you have resolved the conflicts in a file, stage it using `git add `. + +### 5. Commit the Changes + +After resolving all conflicts, commit the changes to your local repository: + +```bash +git commit -m "Upgrade to v7.4.1" +``` + +### 6. Update Dependencies + +Finally, update your local theme gems: + +```bash +bundle update +``` + +## Post-Upgrade + +### Check for Breaking Changes + +Before upgrading, it's a good practice to check the release notes on GitHub for any breaking changes or specific instructions for the new version. + +### Local Testing + +After upgrading, always test your website locally to ensure everything works as expected before deploying the changes. You can run your site locally with: + +```bash +bundle exec jekyll serve -l +OR +bash tools/run.sh +``` + +## Rollback Process + +If the upgrade introduces issues or does not work as expected, you can revert the changes using Git. + +### 1. Revert the Merge Commit + +If you followed the upgrade steps and created a single merge commit (as suggested with `--squash`), you can revert this commit: + +```bash +git revert +``` + +To find the commit hash, you can use `git log`. Look for the commit message "Upgrade to v7.4.1" (or whatever message you used). + +### 2. Reset to a Previous State (Use with Caution) + +If you need to discard all changes since the last good commit before the upgrade, you can perform a hard reset. **Be extremely careful with this command as it will discard all uncommitted changes and revert your working directory to the state of the specified commit.** + +```bash +git reset --hard +``` + +Replace `` with the hash of the commit *before* you started the upgrade process. + +### 3. Clean Up Dependencies + +After reverting the code, you might also need to revert your `Gemfile.lock` or run `bundle install` to ensure your dependencies match the reverted state. + +```bash +bundle install +``` + +## Results + +The upgrade to Jekyll Chirpy theme version 7.4.1 was successfully completed, but it encountered and resolved several issues: + +### Issues Encountered + +1. **Native gem compilation errors**: During `bundle update`, the process failed when trying to compile the `json` (version 2.15.2) and `racc` (version 1.8.1) gems. The error was caused by a missing `gmkdir` utility in the build process on macOS. + +2. **YAML syntax error**: After resolving the gem compilation issues, starting the Jekyll server revealed a YAML syntax error in `_data/share.yml` at line 5, column 27. The first entry had improperly formatted inline syntax where `icon` was on the same line as `type`. + +3. **Incorrect Image Paths**: After upgrading, the images on each post were not being rendered. + +### Solutions Applied + +1. **Fixed native gem compilation**: + - Installed the `coreutils` package via `brew install coreutils` to provide the missing `gmkdir` utility + - Installed the problematic gems individually: `gem install json -v '2.15.2'` and `gem install racc -v '1.8.1'` + - Then successfully ran `bundle update` to complete the dependency updates + +2. **Fixed YAML syntax error**: + - Corrected the formatting in `_data/share.yml` where the LinkedIn platform entry had invalid inline syntax + - Changed from `type: Linkedin icon: "fab fa-linkedin"` to separate lines: + ```yaml + - type: Linkedin + icon: "fab fa-linkedin" + link: "https://www.linkedin.com/sharing/share-offsite/?url=URL" + ``` +3. **Incorrect Image Paths**: + +BEFORE: + +![Maintenance's Logical Diagram](2020-09-21/fig2-maintenance-changes.webp){: w="900" h="600" } + +AFTER +![Maintenance's Logical Diagram](/assets/img/posts/2020-09-21/fig2-maintenance-changes.webp){: w="900" h="600" } + +### Final Status + +- Jekyll theme successfully upgraded to Chirpy v7.4.1 +- All dependencies updated and compatible +- Local Jekyll server running successfully at http://127.0.0.1:4000 +- Site builds without errors +- Ready for deployment From 9080baa1ec12c938b730f6095dc7bdb9f89a0b57 Mon Sep 17 00:00:00 2001 From: Daniel Macuare Date: Fri, 31 Oct 2025 13:52:23 +0100 Subject: [PATCH 5/7] Upgrading to v7.4.1: Fixing _data/share.yml --- _data/share.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_data/share.yml b/_data/share.yml index a70180b..55a5569 100644 --- a/_data/share.yml +++ b/_data/share.yml @@ -2,7 +2,8 @@ # Icons from platforms: - - type: Linkedin icon: "fab fa-linkedin" + - type: Linkedin + icon: "fab fa-linkedin" link: "https://www.linkedin.com/sharing/share-offsite/?url=URL" - type: Twitter From fdba13b40504e27b5f46d2953e609ab26042a3f2 Mon Sep 17 00:00:00 2001 From: Daniel Macuare Date: Fri, 31 Oct 2025 14:06:03 +0100 Subject: [PATCH 6/7] Upgrading to v7.4.1: Temporary Pipeline for testing --- .github/workflows/pages-deploy.yml | 1 + .github/workflows/test-build.yml | 34 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/test-build.yml diff --git a/.github/workflows/pages-deploy.yml b/.github/workflows/pages-deploy.yml index cc28f99..eb51f29 100644 --- a/.github/workflows/pages-deploy.yml +++ b/.github/workflows/pages-deploy.yml @@ -4,6 +4,7 @@ on: branches: - main - master + - upgrade-v7.4.1 # Temporary for testing paths-ignore: - .gitignore - README.md diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml new file mode 100644 index 0000000..50a31d6 --- /dev/null +++ b/.github/workflows/test-build.yml @@ -0,0 +1,34 @@ +name: "Test Build" +on: + push: + branches-ignore: + - main + - master + pull_request: + +jobs: + test-build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.3 + bundler-cache: true + + - name: Build site + run: bundle exec jekyll build + env: + JEKYLL_ENV: "production" + + - name: Test site + run: | + bundle exec htmlproofer _site \ + \-\-disable-external \ + \-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/" \ No newline at end of file From 44522403a9a060e366cba30a7b7a4e64f7057632 Mon Sep 17 00:00:00 2001 From: Daniel Macuare Date: Fri, 31 Oct 2025 14:11:05 +0100 Subject: [PATCH 7/7] Upgrading to v7.4.1: Temporary Pipeline for testing 2 --- .github/workflows/pages-deploy.yml | 2 +- .github/workflows/test-build.yml | 34 ------------------------------ 2 files changed, 1 insertion(+), 35 deletions(-) delete mode 100644 .github/workflows/test-build.yml diff --git a/.github/workflows/pages-deploy.yml b/.github/workflows/pages-deploy.yml index eb51f29..b32db90 100644 --- a/.github/workflows/pages-deploy.yml +++ b/.github/workflows/pages-deploy.yml @@ -43,7 +43,7 @@ jobs: - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.3 + ruby-version: 3.1.4 bundler-cache: true - name: Build site diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml deleted file mode 100644 index 50a31d6..0000000 --- a/.github/workflows/test-build.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: "Test Build" -on: - push: - branches-ignore: - - main - - master - pull_request: - -jobs: - test-build: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.3 - bundler-cache: true - - - name: Build site - run: bundle exec jekyll build - env: - JEKYLL_ENV: "production" - - - name: Test site - run: | - bundle exec htmlproofer _site \ - \-\-disable-external \ - \-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/" \ No newline at end of file