diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
deleted file mode 100644
index 39c428d..0000000
--- a/.devcontainer/devcontainer.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "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
deleted file mode 100644
index a4bc282..0000000
--- a/.devcontainer/post-create.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/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/.editorconfig b/.editorconfig
deleted file mode 100644
index 2b740bf..0000000
--- a/.editorconfig
+++ /dev/null
@@ -1,19 +0,0 @@
-root = true
-
-[*]
-charset = utf-8
-indent_style = space
-indent_size = 2
-trim_trailing_whitespace = true
-# Unix-style newlines with a newline ending every file
-end_of_line = lf
-insert_final_newline = true
-
-[*.{js,css,scss}]
-quote_type = single
-
-[*.{yml,yaml}]
-quote_type = double
-
-[*.md]
-trim_trailing_whitespace = false
diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index 262d6bd..0000000
--- a/.gitattributes
+++ /dev/null
@@ -1,16 +0,0 @@
-# Set default behavior to automatically normalize line endings.
-* text=auto
-
-# Force bash scripts to always use LF line endings so that if a repo is accessed
-# in Unix via a file share from Windows, the scripts will work.
-*.sh text eol=lf
-
-# Force batch scripts to always use CRLF line endings so that if a repo is accessed
-# in Windows via a file share from Linux, the scripts will work.
-*.{cmd,[cC][mM][dD]} text eol=crlf
-*.{bat,[bB][aA][tT]} text eol=crlf
-
-# Denote all files that are truly binary and should not be modified.
-*.png binary
-*.jpg binary
-*.ico binary
diff --git a/.github/workflows/pages-deploy.yml b/.github/workflows/pages-deploy.yml
deleted file mode 100644
index cc28f99..0000000
--- a/.github/workflows/pages-deploy.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-name: "Build and Deploy"
-on:
- push:
- branches:
- - main
- - master
- paths-ignore:
- - .gitignore
- - README.md
- - LICENSE
-
- # Allows you to run this workflow manually from the Actions tab
- workflow_dispatch:
-
-permissions:
- contents: read
- pages: write
- id-token: write
-
-# Allow one concurrent deployment
-concurrency:
- group: "pages"
- cancel-in-progress: true
-
-jobs:
- build:
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- # submodules: true
- # If using the 'assets' git submodule from Chirpy Starter, uncomment above
- # (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets)
-
- - name: Setup Pages
- id: pages
- uses: actions/configure-pages@v4
-
- - name: Setup Ruby
- uses: ruby/setup-ruby@v1
- with:
- ruby-version: 3.3
- bundler-cache: true
-
- - name: Build site
- run: bundle exec jekyll b -d "_site${{ steps.pages.outputs.base_path }}"
- 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/"
-
- - name: Upload site artifact
- uses: actions/upload-pages-artifact@v3
- with:
- path: "_site${{ steps.pages.outputs.base_path }}"
-
- deploy:
- environment:
- name: github-pages
- url: ${{ steps.deployment.outputs.page_url }}
- runs-on: ubuntu-latest
- needs: build
- steps:
- - name: Deploy to GitHub Pages
- id: deployment
- uses: actions/deploy-pages@v4
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 58062c5..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "assets/lib"]
- path = assets/lib
- url = https://github.com/cotes2020/chirpy-static-assets.git
diff --git a/.nojekyll b/.nojekyll
deleted file mode 100644
index 8b13789..0000000
--- a/.nojekyll
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
deleted file mode 100644
index 082bc94..0000000
--- a/.vscode/extensions.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "recommendations": ["ms-vscode-remote.remote-containers"]
-}
diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index 5e8a04f..0000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- // 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
deleted file mode 100644
index 7f0fdb8..0000000
--- a/.vscode/tasks.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "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
deleted file mode 100644
index dbd3872..0000000
--- a/Gemfile
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-source "https://rubygems.org"
-
-gem "jekyll-theme-chirpy", "~> 7.1", ">= 7.1.1"
-
-gem "html-proofer", "~> 5.0", group: :test
-
-platforms :mingw, :x64_mingw, :mswin, :jruby do
- gem "tzinfo", ">= 1", "< 3"
- gem "tzinfo-data"
-end
-
-gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
diff --git a/README.md b/README.md
index ca6e471..f4f0c46 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,3 @@
-once upon a time
+```sh
+$ man andwati
+```
\ No newline at end of file
diff --git a/_config.yml b/_config.yml
deleted file mode 100644
index 4382a39..0000000
--- a/_config.yml
+++ /dev/null
@@ -1,225 +0,0 @@
-# The Site Configuration
-
-# Import the theme
-theme: jekyll-theme-chirpy
-
-# The language of the webpage › http://www.lingoes.net/en/translator/langcode.htm
-# If it has the same name as one of the files in folder `_data/locales`, the layout language will also be changed,
-# otherwise, the layout language will use the default value of 'en'.
-lang: en
-
-# Change to your timezone › https://kevinnovak.github.io/Time-Zone-Picker
-timezone: Africa/Nairobi
-
-# jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
-# ↓ --------------------------
-
-title: andwati # the main title
-
-tagline: Thoughts and musings # it will display as the subtitle
-
-description: >- # used by seo meta and the atom feed
- andwati's site
-
-# Fill in the protocol & hostname for your site.
-# E.g. 'https://username.github.io', note that it does not end with a '/'.
-url: ""
-
-github:
- username: andwati # change to your GitHub username
-
-twitter:
- username: andwati_ # change to your Twitter username
-
-social:
- # Change to your full name.
- # It will be displayed as the default author of the posts and the copyright owner in the Footer
- name: Ian Andwati
- email: andwatiian@gmail.com # change to your email address
- links:
- # The first element serves as the copyright owner's link
- - https://twitter.com/andwati_ # change to your Twitter homepage
- - https://github.com/andwati # change to your GitHub homepage
- # Uncomment below to add more social links
- # - https://www.facebook.com/username
- - https://www.linkedin.com/in/andwati
-
-# Site Verification Settings
-webmaster_verifications:
- google: lBZ8ofF4rZJjQDf6ngTrI20wzaDq9GVMCsxfZfTcllI # 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
-
-# Web Analytics Settings
-analytics:
- google:
- id: G-3QJCKHZT3J # fill in your Google Analytics ID
- goatcounter:
- id: andwati # fill in your GoatCounter ID
- umami:
- id: # fill in your Umami ID
- domain: # fill in your Umami domain
- matomo:
- id: # fill in your Matomo ID
- domain: # fill in your Matomo domain
- cloudflare:
- id: # fill in your Cloudflare Web Analytics token
- fathom:
- id: # fill in your Fathom Site ID
-
-# Page views settings
-pageviews:
- provider: goatcounter # now only supports 'goatcounter'
-
-# Prefer color scheme setting.
-#
-# Note: Keep empty will follow the system prefer color by default,
-# and there will be a toggle to switch the theme between dark and light
-# on the bottom left of the sidebar.
-#
-# Available options:
-#
-# light — Use the light color scheme
-# dark — Use the dark color scheme
-#
-theme_mode: # [light | dark]
-
-# The CDN endpoint for media resources.
-# Notice that once it is assigned, the CDN url
-# will be added to all media resources (site avatar, posts' images, audio and video files) paths starting with '/'
-#
-# e.g. 'https://cdn.com'
-cdn:
-
-# the avatar on sidebar, support local or CORS resources
-avatar:
-
-# The URL of the site-wide social preview image used in SEO `og:image` meta tag.
-# It can be overridden by a customized `page.image` in front matter.
-social_preview_image: # string, local or CORS resources
-
-# boolean type, the global switch for TOC in posts.
-toc: true
-
-comments:
- # Global switch for the post-comment system. Keeping it empty means disabled.
- provider: utterances # [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/
- utterances:
- repo: andwati/andwati.github.io # /
- issue_term: # < url | pathname | title | ...>
- # Giscus options › https://giscus.app
- giscus:
- repo: # /
- repo_id:
- category:
- category_id:
- mapping: # optional, default to 'pathname'
- strict: # optional, default to '0'
- input_position: # optional, default to 'bottom'
- lang: # optional, default to the value of `site.lang`
- reactions_enabled: # optional, default to the value of `1`
-
-# Self-hosted static assets, optional › https://github.com/cotes2020/chirpy-static-assets
-assets:
- self_host:
- 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]
-
-pwa:
- enabled: true # The option for PWA feature (installable)
- cache:
- enabled: true # The option for PWA offline cache
- # Paths defined here will be excluded from the PWA cache.
- # Usually its value is the `baseurl` of another website that
- # shares the same domain name as the current website.
- deny_paths:
- # - "/example" # URLs match `/example/*` will not be cached by the PWA
-
-paginate: 10
-
-# The base URL of your site
-baseurl: ""
-
-# ------------ 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
- # default_lang: console
- span:
- line_numbers: false
- block:
- line_numbers: true
- start_line: 1
-
-collections:
- tabs:
- output: true
- sort_by: order
-
-defaults:
- - scope:
- path: "" # An empty string here means all files in the project
- type: posts
- values:
- layout: post
- comments: true # Enable comments in posts.
- toc: true # Display TOC column in posts.
- # DO NOT modify the following parameter unless you are confident enough
- # to update the code of all other post links in this project.
- permalink: /posts/:title/
- - scope:
- path: _drafts
- values:
- comments: false
- - scope:
- path: ""
- type: tabs # see `site.collections`
- values:
- layout: page
- permalink: /:title/
-
-sass:
- style: compressed
-
-compress_html:
- clippings: all
- comments: all
- endings: all
- profile: false
- blanklines: false
- ignore:
- envs: [development]
-
-exclude:
- - "*.gem"
- - "*.gemspec"
- - docs
- - tools
- - README.md
- - LICENSE
- - "*.config.js"
- - package*.json
-
-jekyll-archives:
- enabled: [categories, tags]
- layouts:
- category: category
- tag: tag
- permalinks:
- tag: /tags/:name/
- category: /categories/:name/
diff --git a/_data/contact.yml b/_data/contact.yml
deleted file mode 100644
index 5c6a518..0000000
--- a/_data/contact.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-# The contact options.
-
-- type: github
- icon: "fab fa-github"
-
-- type: twitter
- icon: "fa-brands fa-x-twitter"
-
-- type: email
- icon: "fas fa-envelope"
- noblank: false # open link in current tab
-
-- type: rss
- icon: "fas fa-rss"
- noblank: false
-# 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: linkedin
-# icon: 'fab fa-linkedin' # icons powered by
-# url: '' # Fill with your Linkedin homepage
-#
-- type: stack-overflow
- icon: 'fab fa-stack-overflow'
- url: 'https://stackoverflow.com/users/12246264/ian-andwati' # Fill with your stackoverflow homepage
-#
-# - type: bluesky
-# icon: 'fa-brands fa-bluesky'
-# url: '' # Fill with your Bluesky profile link
-#
-# - type: reddit
-# icon: 'fa-brands fa-reddit'
-# url: '' # Fill with your Reddit profile link
-#
-# - type: threads
-# icon: 'fa-brands fa-threads'
-# url: '' # Fill with your Threads profile link
diff --git a/_data/share.yml b/_data/share.yml
deleted file mode 100644
index 885231c..0000000
--- a/_data/share.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-# Sharing options at the bottom of the post.
-# Icons from
-
-platforms:
- - type: Twitter
- icon: "fa-brands fa-square-x-twitter"
- link: "https://twitter.com/intent/tweet?text=TITLE&url=URL"
-
- - type: Facebook
- icon: "fab fa-facebook-square"
- link: "https://www.facebook.com/sharer/sharer.php?title=TITLE&u=URL"
-
- - type: Telegram
- icon: "fab fa-telegram"
- link: "https://t.me/share/url?url=URL&text=TITLE"
-
- # Uncomment below if you need to.
- #
- - type: Linkedin
- icon: "fab fa-linkedin"
- link: "https://www.linkedin.com/sharing/share-offsite/?url=URL"
- #
- # - type: Weibo
- # icon: "fab fa-weibo"
- # link: "https://service.weibo.com/share/share.php?title=TITLE&url=URL"
- #
- # - type: Mastodon
- # icon: "fa-brands fa-mastodon"
- # # See: https://github.com/justinribeiro/share-to-mastodon#properties
- # instances:
- # - label: mastodon.social
- # link: "https://mastodon.social/"
- # - label: mastodon.online
- # link: "https://mastodon.online/"
- # - label: fosstodon.org
- # link: "https://fosstodon.org/"
- # - label: photog.social
- # link: "https://photog.social/"
- #
- - type: Bluesky
- icon: "fa-brands fa-bluesky"
- link: "https://bsky.app/intent/compose?text=TITLE%20URL"
- #
- - type: Reddit
- icon: "fa-brands fa-square-reddit"
- link: "https://www.reddit.com/submit?url=URL&title=TITLE"
- #
- # - type: Threads
- # icon: "fa-brands fa-square-threads"
- # link: "https://www.threads.net/intent/post?text=TITLE%20URL"
diff --git a/_plugins/posts-lastmod-hook.rb b/_plugins/posts-lastmod-hook.rb
deleted file mode 100644
index 1fd6ecf..0000000
--- a/_plugins/posts-lastmod-hook.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-#
-# Check for changed posts
-
-Jekyll::Hooks.register :posts, :post_init do |post|
-
- commit_num = `git rev-list --count HEAD "#{ post.path }"`
-
- if commit_num.to_i > 1
- lastmod_date = `git log -1 --pretty="%ad" --date=iso "#{ post.path }"`
- post.data['last_modified_at'] = lastmod_date
- end
-
-end
diff --git a/_posts/2022-11-04-hello-world.md b/_posts/2022-11-04-hello-world.md
deleted file mode 100644
index f8a2bdc..0000000
--- a/_posts/2022-11-04-hello-world.md
+++ /dev/null
@@ -1,34 +0,0 @@
----
-title : Hello World
-description : Hello world
-date : 2022-11-04
-tags : [hugo, blog, go]
----
-
-How it begins
-
-
-
-In this post-web2.0 age, people seem to blog less and less, and blogs seem to be dying slowly. People are separated in different Apps where the content is not searchable by search engines.
-
-However, I still prefer to write using a blog.
-
-# Why this?
-
-The best way to learn something is to teach others the knowledge that you have gained. Regurgitating that information will solidify it more firmly in your mind.
-
-# What I write?
-
-Mostly random stuff and a few tutorials. I'll see where this goes.Although some of the blog posts may only be helpful to myself, but who knows, I hope they will be helpful to someone else in some day.
-
-# Static blog generator
-
-I use hugo as a static site generator.After trying a couple of blogging platforms and trying to build a few from scratch I decided to
-throw in the towel and opt in for a ready made solution, no need reinventing the wheel.
-
-Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again.Hugo provides a robust theming system that is easy to implement but capable of producing even the most complicated websites.Hugo's Go-based templates provide just the right amount of logic to build anything from the simple to complex. For this site I decided to go with the [even theme](https://github.com/olOwOlo/hugo-theme-even). The commenting system is implemented using [Utterances](https://utteranc.es/)
-
-# Blog site hosting
-
-The site is hosted on github pages as evident by the \*.github.io domain name.I prefer this mainly because it is free and I don't have
-to switch to a different hosting provider.
diff --git a/_posts/2022-11-11-generate-django-secret-key.md b/_posts/2022-11-11-generate-django-secret-key.md
deleted file mode 100644
index 26dccb4..0000000
--- a/_posts/2022-11-11-generate-django-secret-key.md
+++ /dev/null
@@ -1,39 +0,0 @@
----
-title : Django Secret Key Tutorial
-description : Managing secrets
-date : 2022-11-11
-tags : [tutorial, django, python, .env]
----
-
-Managing the Django SECRET_KEY variable.
-
-
-
-The Django `SECRET_KEY` variable is very crucial to your Django application. The secret key must be a large random value and it must be kept secret. Leaking this value to unauthorized people could lead to a security breach. The SECRET_KEY is used in Django for cryptographic signing. It is used to generate tokens and hashes, they can be recreated using this variable. If it is not configured Django throws a `django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty` error
-
-# Using Environment Variables
-
-The secret key should not be committed to version control. It is best practice to store the value in a .env file which is added to the .gitignore file to un-track its changes. The values can be loaded programmatically into your settings.py file.
-
-# Generating A New Secret Key
-
-This solution is using python's secrets lib on the back
-
-```python
-from django.core.management.utils import get_random_secret_key
-# print new random secret key
-print(get_random_secret_key())
-```
-
-This code can be run in the terminal as a command:
-
-```python
-python -c 'from django.core.management.utils import get_random_secret_key; \
- print(get_random_secret_key())'
-```
-
-Alternatively, If you are using python 3.6+ then you can use the `secrets.token_hex(\[nbytes=None])` function:
-
-```python
-python3 -c 'import secrets; print(secrets.token_hex(100))'
-```
diff --git a/_posts/2022-11-24-integrating-netlify.md b/_posts/2022-11-24-integrating-netlify.md
deleted file mode 100644
index 03d4c20..0000000
--- a/_posts/2022-11-24-integrating-netlify.md
+++ /dev/null
@@ -1,157 +0,0 @@
----
-title : Integrating Netlify CMS
-description : Integrating netlify cms
-date : 2022-11-24
-tags : [blog, hugo, netlify,netlify-cms,github]
----
-
-Migrating to a better content management system through Netlify CMS
-
-
-
-# Heavy Lifting
-
-I use [Visual Studio Code](https://code.visualstudio.com/) to manually edit the blog post content on this website. This is quite a hassle because I have to deal with
-markdown files. There are many problems with this approach and several gotchas. I have to work on a local site repository to be able to edit the content. My GitHub credentials are also required to push my local changes to my remote repository on GitHub so that it can trigger the build process and publish the site.
-
-This process has helped me a lot to master markdown syntax and some practice on my git skills. It’s fun to update the website content following these steps but sometimes it can be frustrating. At those times, I really miss the user interface of content management systems. After careful consideration, I moved on with Netlify CMS. At its core, Netlify CMS is an open-source React app that acts as a wrapper for the Git workflow, using the GitHub, GitLab, or Bitbucket API. This provides many advantages, including:
-
-- **Fast, web-based UI:** With rich-text editing, real-time preview, and drag-and-drop media uploads.
-- **Platform agnostic:** Works with most static site generators.
-- **Easy installation:** Add two files to your site and hook up the backend by including those files in your build process or linking to our Content Delivery Network (CDN).
-- **Modern authentication:** Using GitHub, GitLab, or Bitbucket and JSON web tokens.
-- **Flexible content types:** Specify an unlimited number of content types with custom fields.
-- **Fully extensible:** Create custom-styled previews, UI widgets, and editor plugins.
-
-# Redeploying to Netlify
-
-I decided to move the site from GitHub pages to Netlify hosting to take full control of the platform. Hugo sites on Netlify can benefit from automatic framework detection and control over Hugo version selection. When you link a repository for a project, Netlify tries to detect the framework your site is using. If your site is built with Hugo, Netlify provides a suggested build command and publish directory: Hugo and public. The build process is straight forward but you can add custom options to your `netlify.toml` file, here are my options:
-
-```toml
-[build]
-command = "hugo"
-publish = "public"
-
-[build.environment]
-HUGO_VERSION = "0.105.0"
-```
-
-# Setting up Netlify CMS
-
-You can adapt Netlify CMS to a wide variety of projects. It works with any content written in markdown, JSON, YAML, or TOML files, stored in a repo on GitHub, GitLab, or Bitbucket. You can Netlify CMS to a site that's built with a common static site generator, like Jekyll, Hugo, Hexo, or Gatsby. The official documentation for installing on your website can be found at the [official site](https://www.netlifycms.org/docs/intro/)
-
-## Steps
-
-**Step 1**
-
-Create a static admin folder containing all Netlify CMS files, stored at the root of your published site. Where you store this folder in the source files depends on your static site generator. For Hugo, it is the `static` folder.
-
-`/static/admin`
-
-**Step 2**
-
-Inside the admin folder, create two files: `index.html` and `config.yml`. The first file `admin/index.html` is an entry point to Netlify CMS. You will access the CMS interface from `yourwebsite.com/admin` when everything is ready.
-
-**Step 3**
-
-The first file, `admin/index.html`, is the entry point for the Netlify CMS admin interface. Paste this code in index.html and save. This HTML starter page will load the Netlify CMS Javascript file:
-
-```html
-
-
-
-
-
- Content Manager
-
-
-
-
-
-
-```
-
-**Step 4**
-
-Now let’s move to the configuration section. These are the configurations that go into the `config.yml` file. This process is different for every site. I followed the guidelines on the website and made minor adjustments. It worked on my website. The configuration options are available at the [docs](). This is how I configured my config.yml file:
-
-```yaml
-backend:
- name: git-gateway
- branch: netlify-cms # Branch to update (optional; defaults to master)
-
-# This line should *not* be indented
-publish_mode: editorial_workflow
-
-media_folder: "static/images/uploads" # Media files will be stored in the repo under static/images/uploads
-public_folder: "/images/uploads" # The src attribute for uploaded media will begin with /images/uploads
-
-collections:
- - name: "post" # Used in routes, e.g., /admin/collections/blog
- label: "posts" # Used in the UI
- folder: "content/post" # The path to the folder where the documents are stored
- create: true # Allow users to create new documents in this collection
- slug: "{{year}}-{{month}}-{{day}}-{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
- fields: # The fields for each document, usually in front matter
- - { label: "Layout", name: "layout", widget: "hidden", default: "blog" }
- - { label: "Title", name: "title", widget: "string" }
- - { label: "Draft", name: "draft", widget: "boolean", default: true }
- - { label: "Publish Date", name: "date", widget: "datetime" }
- - { label: "Last Modified", name: "lastmod", widget: "datetime" }
- - { label: "Body", name: "body", widget: "markdown" }
- - { label: "Keywords", name: "keywords", widget: "list" }
- - { label: "Tags", name: "tags", widget: "list" }
- - { label: "Categories", name: "categories", widget: "list" }
- - { label: "Comments", name: "comment", widget: "boolean", default: true }
- - {
- label: "Table of Contents",
- name: "toc",
- widget: "boolean",
- default: true,
- }
-```
-
-**Step 5**
-
-**Authentication**
-
-Now that the Netlify CMS files are in place and configured, all that's left is to enable authentication.
-Netlify offers a built-in authentication service called Identity. In order to use it, connect your site repo with Netlify. Netlify has published a general [Step-by-Step Guide](https://www.netlify.com/blog/2016/10/27/a-step-by-step-guide-deploying-a-static-site-or-single-page-app/) for this, along with detailed guides for many popular static site generators
-
-Let’s first enable Netlify Identity and Git Gateway:
-
-- On your Netlify account, go to **Settings > Identity** and select **Enable Identity Service**
-- Under **Registration preferences**, select **Invite Only**.
-- If you want to enable login from external providers such as Google and GitHub, check the boxes you want to use, under **External Providers** section. I find it practical to log in with GitHub, so I added it.
-- Go to **Services > Git Gateway**, and click **Enable Git Gateway**. This authenticates with your Git Host and generates and API token.
-- Everything is almost set up. What we need now is a front-end interface to connect. We will add the following script in two places, to include the **Netlify Identity Widget** on our website:
-
-```html
-
-```
-
-We will use Netlify's [script injection](https://docs.netlify.com/site-deploys/post-processing/snippet-injection/) feature to add the script to our site. To use snippet injection, go to **Site Settings > Build & Deploy > Post processing**. Find the Snippet Injection section and select **Add Snippet**. Write a name for the script in the first box (e.g. Netlify Identity Widget). Paste the script inside the second box. Choose Insert before the `
` tag of our website’s main index page. This script allows the user to redirect back to the `/admin/` path after completing the login with the Netlify Identity Widget:
-
-```html
-
-```
-
-**Step 5**
-
-Now we’re all set. Since we set our registration preferences to **“Invite Only”**, we need to invite ourselves as site users. To do this, select the Identity tab from the Netlify site dashboard and select the Invite Users button. Add your email address and send an invitation. You will receive an email. In your email, click **“accept the invitation”**. You will be directed to your website admin sign-up panel. Choose a password. Now you are ready to log in to Netlify CMS.
-
-# Setting up a custom domain
-
-I bought a custom domain from [Namecheap](https://namecheap.com), they provide some pretty good deals. After pointing the nameservers for the domain to the Netlify nameservers, voila! everything worked smoothly. For HTTPS support, Netlify enables automatic TLS certificates with Let’s Encrypt.
diff --git a/_posts/2023-01-24-semantic-version-and-conventional-commits.md b/_posts/2023-01-24-semantic-version-and-conventional-commits.md
deleted file mode 100644
index 3a640df..0000000
--- a/_posts/2023-01-24-semantic-version-and-conventional-commits.md
+++ /dev/null
@@ -1,88 +0,0 @@
----
-title: Semantic Versioning(SemVer) and Conventional Commits
-description : Adopting best practices in your git and build workflows.
-date: 2023-01-24
-media_subpath: /static/
-tags: [git, semver,workflow, conventional commits]
----
-
-Adopting best practices in your git and build workflows.
-
-
-
-# What is Semver?
-
-Semantic versioning or just SemVer is a dependency naming guidline that aims to bring some sanity into naming libraries and packages in software development. It is a standard versioning system created by **Tom Preston Werner** (co-founder of Github) that’s used to communicate what changes are in a release.
-
-An efficient and smooth versioning becomes crucial for efficient software delivery expecially for projects that expose a public API. This saves the developers the chaos that is **dependency hell**.Dependency hell is a colloquial term for the frustration of some software users who have installed software packages which have dependencies on specific versions of other software packages.
-
-The dependency issue arises when several packages have dependencies on the same shared packages or libraries, but they depend on different and incompatible versions of the shared packages. If the shared package or library can only be installed in a single version, the user may need to address the problem by obtaining newer or older versions of the dependent packages. This, in turn, may break other dependencies and push the problem to another set of packages.
-
-## Semantic Versioning Specifications
-
-### Summary
-
-Semantic versioning is based on three numbers that indicate the versions of the software and the compatibilities.They are `X.Y.Z` corresponding to `Major.Minor.Patch`
-
-- **Major Version (X):**Introduces major changes to the code and breaking changes toward backward compatibility
-- **Minor Version (Y):** These code changes don’t introduce breaking changes. This could be adding a new feature that doesn't break changes but are not exactly bug fixes.
-- **Patches (Z):** Mainly correspond to bug fixes
-
-### Examples in common packages
-
-#### React(v18.2.0)
-
-
-
-- **Major -> 18**
-- **Minor -> 2**
-- **Patch -> 0**
-
----
-
-#### Pipx(v1.1.0)
-
-
-
-- **Major -> 1**
-- **Minor -> 1**
-- **Patch -> 0**
-
----
-
-## Start at v0.1.0 or v1.0.0?
-
-Convention recommends that in the initial development phase the starting version should be 0.1.0 which makes sense since it’s not in production yet.
-
-The version should only be bumped to 1.0.0 only if it is being used in production and stable.
-
-If your software is being used in production, it should probably already be 1.0.0. If you have a stable API on which users have come to depend, you should be 1.0.0. If you’re worrying a lot about backwards compatibility, you should probably already be 1.0.0.
-
-# Conventional Commits
-
-Conventional Commits is a convention on top of commit messages that are used to automate version changes. It provides an easy set of rules for creating commit messages and works well with SemVer by describing features, fixes and breaking changes that correspond to SemVer standards.
-
-## Summary
-
-The commit message should be structured as follows:
-
-```
-[optional scope]:
-
-[optional body]
-
-[optional footer(s)]
-```
-
-The commit contains the following structural elements, to communicate intent to the consumers of your library:
-
-1. fix: a commit of the type fix patches a bug in your codebase (this correlates with PATCH in Semantic Versioning).
-2. feat: a commit of the type feat introduces a new feature to the codebase (this correlates with MINOR in Semantic Versioning).
-3. BREAKING CHANGE: a commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in Semantic Versioning). A BREAKING CHANGE can be part of commits of any type.
-4. types other than fix: and feat: are allowed, for example @commitlint/config-conventional (based on the Angular convention) recommends build:, chore:, ci:, docs:, style:, refactor:, perf:, test:, and others.
-5. footers other than BREAKING CHANGE: may be provided and follow a convention similar to git trailer format.
-
-# Resources
-
-https://semver.org/
-https://www.conventionalcommits.org/en/v1.0.0/
diff --git a/_posts/2023-02-16-install-postgresql-15-on-arch-manjaro-garuda-linux.md b/_posts/2023-02-16-install-postgresql-15-on-arch-manjaro-garuda-linux.md
deleted file mode 100644
index 4baa0e5..0000000
--- a/_posts/2023-02-16-install-postgresql-15-on-arch-manjaro-garuda-linux.md
+++ /dev/null
@@ -1,172 +0,0 @@
----
-title : Install PostgreSQL 15 on Arch | Manjaro | Garuda Linux
-description : Installing postgresql
-date : 2023-02-16
-tags : [postgresql, archlinux, manjaro, garuda, linux]
-categories: [programming, tutorial]
----
-
-Getting PostgreSQL up and running on Arch Linux-based distros
-
-
-
-# Overview
-
-**PostgreSQL** is a powerful open-source relational database management system (RDBMS) that allows you to store and manage large amounts of data. It was first released in 1996 and has become one of the most popular RDBMSs in the world.
-
-PostgreSQL is designed to handle high levels of **concurrency**, providing features such as **MVCC (multi-version concurrency control)** that allow multiple users to access the same data simultaneously without conflicts. It is also **highly extensible**, with a large number of third-party extensions and libraries available that can be used to add functionality to the core database.
-
-Some of the key features of PostgreSQL include support for **complex SQL queries**, **advanced indexing** and **query optimization**, **transactional integrity**, and support for a **wide range of programming languages** and development frameworks.PostgreSQL is used by a wide range of organizations, from small businesses to large enterprises, and is particularly popular in industries such as finance, healthcare, and e-commerce, where high levels of data security and reliability are critical.
-
-In this tutorial, we’ll look at how to install PostgreSQL 15 on Arch Linux, Manjaro, Garuda Linux, or any other Arch-based distro out there.
-
-# PostgreSQL use cases
-
-- **E-commerce websites:** PostgreSQL is a popular choice for e-commerce websites because it can handle large amounts of data and supports complex queries. It is used for product catalogs, order management, customer data, and more.
-- **Financial institutions:** PostgreSQL is used in financial institutions to store and manage transactional data, such as stock trades, bank transfers, and credit card transactions. It is highly secure and provides features such as transactional integrity and data encryption.
-- **Healthcare industry:** PostgreSQL is used in the healthcare industry to store patient data, such as medical records and diagnostic test results. It is also used for research purposes, where large amounts of data need to be stored and analyzed.
-- **Government agencies:** PostgreSQL is used by government agencies for a variety of purposes, including managing large datasets, storing and analyzing census data, and managing public health information.
-- **Mobile and web applications:** PostgreSQL is often used as a back-end database for mobile and web applications. It provides reliable data storage and retrieval and supports a wide range of programming languages and development frameworks.
-- **Geospatial applications:** PostgreSQL has built-in support for geospatial data and is often used for applications that require location-based data, such as mapping and GPS tracking.
-
-# Why PostgreSQL?
-
-Postgres offers a lot of advantages that make it an excellent choice for highly transactional environments regardless of application size and data volume. Its rich feature set and flexibility make it a popular choice for a wide range of applications and industries. Some of the top features are:
-
-- **ACID Compliance:** PostgreSQL is ACID (Atomicity, Consistency, Isolation, Durability) compliant, which means it provides high reliability, consistency, and data integrity, even in the presence of hardware failures, power outages, and other system errors.
-- **Extensibility:** PostgreSQL is highly extensible, allowing developers to add new data types, operators, and functions using its extension framework. This makes it easy to customize PostgreSQL to meet the specific needs of your application.
-- **Concurrency:** PostgreSQL provides a high level of concurrency, allowing multiple users to access the same data at the same time without conflicts. It uses a Multi-Version Concurrency Control (MVCC) model that enables fast and reliable access to data, even under heavy load.
-- **Full-text search:** PostgreSQL provides a powerful full-text search engine that supports advanced search capabilities, such as stemming, ranking, and relevance matching.
-- **Advanced indexing:** PostgreSQL provides a wide range of indexing options, including B-tree, Hash, GiST, SP-GiST, GIN, and BRIN. These indexing options allow developers to optimize database performance for their specific use cases.
-- **JSON support:** PostgreSQL provides native support for storing and querying JSON data, making it easy to work with modern web and mobile applications that rely on JSON for data exchange.
-- **Security:** PostgreSQL provides a high level of security, with features such as SSL support, client authentication, and role-based access control. It also provides encryption for both data at rest and data in transit.
-- **Scalability:** PostgreSQL is designed to scale horizontally and vertically, allowing you to add more nodes to a cluster or increase the resources of a single node to handle more load.
-
-# Install PostgreSQL on Arch | Manjaro | Garuda Linux
-
-Now with all that fluff out of the way, let's get to business. The steps have been tested on Arch Linux with the KDE desktop.
-
-> **Note:** Commands that should be run as the *postgres* user are prefixed by `[postgres]` in this article.
-
-## Step 1: Installing the PostgreSQL Package
-
-```sh
- sudo pacman -Syu postgresql
-```
-
-This command will update the package database and update all packages on the system then install the PostgreSQL package from your distribution mirrors. Never install a package without updating the system first. On a rolling release, this can lead to an unbootable system. Installing the package will also create a system user called *postgres*. You can now switch to the *postgres* user using a privilege elevation program.
-
-You can switch to the PostgreSQL user by executing the following command:
-
-- If you have sudo and are in sudoers
-
- ```sh
- sudo -iu postgres
- ```
-
-- Otherwise using su:
-
- ```sh
- su
- # su -l postgres
- ```
-
-## Step 2: Initial Configuration
-
-Before PostgreSQL can function correctly, the database cluster must be initialized.
-
-### 2.1 We can confirm the installed PostgreSQL version by running:
-
-```sh
- postgres --version ─╯
-postgres (PostgreSQL) 15.1
-```
-
-### 2.2 Set applicable entries in **/etc/locale.gen**
-
-```sh
- echo "en_US.UTF-8 UTF-8" | sudo tee /etc/locale.gen
-```
-
-### 2.3 Then run **\*\*locale-gen\*\*** to generate locale settings
-
-```sh
- sudo locale-gen
-Generating locales...
- en_US.UTF-8... done
-Generation complete.
-```
-
-### 2.4 Initialize Postgres Data Directory
-
-You must first log in as the **postgres** user using the following command before you can initialize PostgreSQL’s data directory:
-
-```sh
-sudo su - postgres
-```
-
-### 2.5 With the following command, you can now initialize PostgreSQL’s data directory:
-
-```sh
-[postgres]$ initdb -D /var/lib/postgres/data
-```
-
-### Step 3: PostgreSQL Service Management
-
-### 3.1 Check PostgreSQL status with the following command:
-
-```sh
- systemctl status postgresql ─╯
- postgresql.service - PostgreSQL database server
- Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; preset: disabled)
- Active: inactive (dead)
-```
-
-### 3.2 Start the PostgreSQL service by running the following command:
-
-```sh
-sudo systemctl start postgresql
-```
-
-### 3.3 Enable the PostgreSQL service to start automatically at boot by running the following command:
-
-```sh
- sudo systemctl enable postgresql
-```
-
-### 3.4 Verify that PostgreSQL is running by running the following command:
-
-```sh
- sudo systemctl status postgresql ─╯
-● postgresql.service - PostgreSQL database server
- Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; preset: disabled)
- Active: active (running) since Thu 2023-02-16 22:52:43 EAT; 20s ago
- Main PID: 26106 (postgres)
- Tasks: 6 (limit: 8790)
- Memory: 16.9M
- CPU: 113ms
- CGroup: /system.slice/postgresql.service
- ├─26106 /usr/bin/postgres -D /var/lib/postgres/data
- ├─26107 "postgres: checkpointer "
- ├─26108 "postgres: background writer "
- ├─26110 "postgres: walwriter "
- ├─26111 "postgres: autovacuum launcher "
- └─26112 "postgres: logical replication launcher "
-```
-
-# Change postgres User Password
-```sh
-sudo -u postgres psql -c "ALTER USER postgres PASSWORD '$PGPASSWORD';"
-```
-
-# Resources
-
-- [Arch Linux Wiki](https://wiki.archlinux.org/title/PostgreSQL)
-- [Wikipedia](https://en.wikipedia.org/wiki/PostgreSQL)
-- [PostgreSQL Documentation](https://www.postgresql.org/docs/)
-
-# Conclusion
-
-Installing PostgreSQL on Arch Linux-based distribution is a straightforward process that can be completed in just a few steps. By following the steps outlined above, you can install, configure, and start the PostgreSQL database server on your Arch Linux system. Once installed, you can use PostgreSQL to store, manage, and query data for a wide range of applications and use cases. With its advanced features and high level of extensibility, PostgreSQL is a popular choice for developers and businesses seeking a robust and reliable database management system.
-
-You can connect to the PostgreSQL server using the psql command-line client or a graphical tool such as pgAdmin.
diff --git a/_posts/2023-04-29-subresource-integrity.md b/_posts/2023-04-29-subresource-integrity.md
deleted file mode 100644
index 8baa25c..0000000
--- a/_posts/2023-04-29-subresource-integrity.md
+++ /dev/null
@@ -1,120 +0,0 @@
----
-title: Subresource Integrity
-description : Understanding Subresource Integrity
-date: 2023-04-29
-tags: [subresource integrity, csp, cors]
----
-
-Understanding Subresource Integrity
-
-
-
-In my junior year while I was learning HTML and CSS I got to use the Bootstrap css library.The easiest way to obtain the files was from a Content Delivery Network(CDN). I could see links such as:
-
-```html
-
-```
-
-I didn't bother with the `integrity` attribute of the link(guess I wasn't curios enough). The integrity attribute has a cryptographic hash value that is important in CDNs and its called the Subresource Integrity.
-
-Subresource Integrity (SRI) is a security feature in web browsers that helps prevent malicious or compromised scripts from being loaded and executed on a website.a security feature that enables browsers to verify that resources they fetch (for example, from a CDN) are delivered without unexpected manipulation. It works by allowing you to provide a cryptographic hash that a fetched resource must match.
-
-When a resource, such as a script or stylesheet, fails the SRI check, the browser will block the resource from being loaded and displayed on the website.
-
-# How Subresource Integrity Helps
-
-Subresource Integrity (SRI) is a security feature that helps protect against certain types of attacks, such as those that involve malicious modifications to third-party resources that a website loads.
-
-SRI works by allowing a website to specify a cryptographic hash for a particular external resource (such as a JavaScript file or a CSS stylesheet) that it expects to load. When a user's browser fetches that resource, it checks the hash against the actual contents of the resource. If the hash doesn't match, the browser will refuse to load the resource, indicating that it may have been tampered with.
-
-This can help prevent a variety of attacks, such as those involving a compromised content delivery network (CDN) or a man-in-the-middle attacker who intercepts and modifies network traffic. By using SRI, a website can help ensure that it is loading only the resources it expects, and that those resources have not been tampered with in transit.
-
-# Using it
-
-Using Subresource Integrity (SRI) involves a few steps, but it is relatively straightforward.An integrity value begins with at least one string, with each string including a prefix indicating a particular hash algorithm (currently the allowed prefixes are sha256, sha384, and sha512), followed by a dash, and ending with the actual base64-encoded hash.
-
-- Generate a cryptographic hash(a base64-encoded cryptographic hash) of the external resource you want to load on your website. This can be done using a hash function such as SHA-256.
-
-- Add the hash as an attribute to the tag that loads the external resource. For example, for a JavaScript file, you would add the integrity attribute to the `
-```
-
-> An integrity value may contain multiple hashes separated by whitespace. A resource will be loaded if it matches one of those hashes.
-
-Make sure the hash you've generated matches the actual contents of the external resource.
-
-Test your website to ensure that the external resource is loading correctly and that the SRI feature is working as intended.
-
-# Tools for generating SRI hashes
-
-You can use a tool such as the [SRI Hash Generator](https://www.srihash.org/) to generate the hash and check it against the file's contents.
-
-You can generate SRI hashes from the command-line with openssl using a command invocation such as:
-
-```sh
-cat FILENAME.py | openssl dgst -sha384 -binary | openssl base64 -A
-```
-
-or with shasum using a command invocation such as:
-
-```sh
-shasum -b -a 384 FILENAME.js | awk '{ print $1 }' | xxd -r -p | base64
-```
-
-> The pipe-through xxd step takes the hexadecimal output from shasum and converts it to binary.
-> The pipe-through awk step is necessary because shasum will pass the hashed filename in its output to xxd. That can have disastrous consequences if the filename happens to have valid hex characters in it — because xxd will also decode that and pass it to base64.
-
-In a Windows environment, you can create a tool for generating SRI hashes with the following code:
-
-```bat
-@echo off
-set bits=384
-openssl dgst -sha%bits% -binary %1% | openssl base64 -A > tmp
-set /p a= < tmp
-del tmp
-echo sha%bits%-%a%
-pause
-```
-
-To use that code:
-
-1. Save that code in a file named sri-hash.bat in the Windows SendTo folder in your environment (for example, C:\Users\USER\AppData\Roaming\Microsoft\Windows\SendTo).
-1. Right-click a file in the File Explorer, select Send to…, and then select sri-hash. You will see the integrity value in a command box.
-1. Select the integrity value and right-click to copy it to the Clipboard.
-1. Press any key to dismiss the command box
-
-# Cross-Origin Resource Sharing and Subresource Integrity
-
-When verifying the subresource integrity of a resource that originates from a different domain than the document it's embedded in, web browsers will check the resource using Cross-Origin Resource Sharing (CORS) to ensure that the domain serving the resource allows it to be shared with the requesting domain.
-As a result, the resource must be served with an Access-Control-Allow-Origin header that permits the resource to be shared with the requesting domain. For example, the header could include a wildcard (\*) to allow any domain to access the resource.
-
-```
-Access-Control-Allow-Origin: *
-```
-
-# How browsers handle Subresource Integrity
-
-Web browsers employ several mechanisms to handle Subresource Integrity (SRI). When a **script** or **link** element with an integrity attribute is encountered by the browser, it compares the script or stylesheet to the expected hash given in the integrity value before executing the script or applying the stylesheet.
-
-For resources served from a different domain than the document in which it's embedded, the browser also checks the resource using Cross-Origin Resource Sharing (CORS) to ensure that the origin serving the resource allows it to be shared with the requesting domain. This additional check is important for preventing unauthorized access to sensitive resources.
-
-If the script or stylesheet fails to match its associated integrity value, the browser will refuse to execute the script or apply the stylesheet and return a network error, indicating that the fetching of that script or stylesheet failed. This behavior ensures that the resource being loaded is trustworthy and helps to protect users from potential security threats.
-
-# References
-
-- [https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)
-- [https://www.srihash.org/](https://www.srihash.org/)
-- [https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity)
-- [https://html.spec.whatwg.org/multipage/semantics.html#attr-script-integrity](https://html.spec.whatwg.org/multipage/semantics.html#attr-script-integrity)
-- [https://html.spec.whatwg.org/multipage/semantics.html#attr-link-integrity](https://html.spec.whatwg.org/multipage/semantics.html#attr-link-integrity)
-- [https://w3c.github.io/webappsec-subresource-integrity/#the-integrity-attribute](https://w3c.github.io/webappsec-subresource-integrity/#the-integrity-attribute)
\ No newline at end of file
diff --git a/_posts/2023-08-24-a-fresh-coat-of-paint.md b/_posts/2023-08-24-a-fresh-coat-of-paint.md
deleted file mode 100644
index 622b7e9..0000000
--- a/_posts/2023-08-24-a-fresh-coat-of-paint.md
+++ /dev/null
@@ -1,56 +0,0 @@
----
-title : A Fresh Coat Of Paint
-description : Migrating to Zola
-date : 2023-08-24
-tags : [zola, blog, tera, rust]
----
-
-Using Zola as my preferred static site generator
-
-
-After using Hugo for over eight months I got tired of it and looked for other alternatives. That's when I stumbled upon Zola. Zola is a static site generator (SSG), similar to [Hugo](https://gohugo.io/), [Pelican](https://blog.getpelican.com/), and [Jekyll](https://jekyllrb.com/).
-
-It is written in Rust and uses the Tera template engine, similar to Jinja2, Django templates, Liquid, and Twig. SSGs use dynamic templates to transform content into static HTML pages. Static sites are thus very fast and require no databases, making them easy to host.
-
-My previous Hugo site used a theme because I wasn't really ready to learn Go's template engine. I'm already familiar with Python Django and its template system so using Tera wasn't hard because it's similar to jinja2 and the Django template syntax.
-
-Content is written in [CommonMark](https://commonmark.org/), a strongly defined, highly compatible specification of [Markdown](https://www.markdownguide.org/). Zola uses [pulldown-cmark](https://github.com/raphlinus/pulldown-cmark#pulldown-cmark) to parse markdown files. The goal of this library is 100% compliance with the CommonMark spec. It adds a few additional features such as parsing footnotes, Github-flavored tables, Github-flavored task lists, and strikethrough.
-
-Zola comes with built-in syntax highlighting, but you must first enable it in the configuration file.
-
-Zola is very minimalistic, it is installed only as a single binary, with no extra dependencies needed. It is configured in `toml` and you only use what is needed. For example here is the configuration for this site `config.toml`:
-
-```toml
-title = "Ian Andwati"
-description = "Ian Andwati's personal website"
-base_url = "https://andwati.github.io"
-
-generate_categories_pages = false
-generate_tags_pages = false
-generate_feed = true
-feed_filename = "rss.xml"
-minify_html = false
-taxonomies = [{ name = 'tags', feed = false }]
-compile_sass = true
-
-[markdown]
-highlight_code = true
-highlight_theme = "gruvbox-dark"
-
-[link_checker]
-
-[extra]
-author = "Ian Andwati"
-```
-
-## Inspiration
-
-The motivation to use Zola also came from my decision to move from independently developed themes. I decided to write the HTML and CSS myself and endeavor to maintain the site individually. The base CSS is borrowed from [Reilly Tucker Siemens](https://tuckersiemens.com/) who had created a nice gruvbox palette for his site.
-
-I improved on it by adding an archive page, pagination, a comment system, and Google Analytics (more of these in later posts). I also implemented article read time and word count.
-
-## What next
-
-The site is a work in progress and is far from polished. I plan on implementing a newsletter to notify readers of new posts. The site is primarily a dark theme, in the future I'll also add theme toggling and maybe different palettes.
-
-You can subscribe to the site's RSS feed at [https://andwati.github.io/rss.xml](https://andwati.github.io/rss.xml).
\ No newline at end of file
diff --git a/_posts/2023-08-24-utterances-comments.md b/_posts/2023-08-24-utterances-comments.md
deleted file mode 100644
index ce3e82f..0000000
--- a/_posts/2023-08-24-utterances-comments.md
+++ /dev/null
@@ -1,65 +0,0 @@
----
-title : What say you?
-description : Adding a comment system by utterances
-date : 2023-08-24
-tags : [blog, utterances]
----
-
-Free speech enhanced
-
-
-
-There is no point in writing online if your readers cannot provide feedback for your writings. You might as well be shouting at a void. My ideal commenting system has to be free, open source and should not be a hassle to setup. Luckily, [utterances 🔮](https://github.com/utterance/utterances) checks all of these conditions
-
-It is a lightweight comments widget built on GitHub issues. Use GitHub issues for blog comments, wiki pages and more! The notable features are:
-
-- Open source. 🙌
-- No tracking, no ads, always free. 📡🚫
-- No lock-in. All data stored in GitHub issues. 🔓
-- Styled with Primer, the css toolkit that powers GitHub. 💅
-- Dark theme. 🌘
-- Lightweight. Vanilla TypeScript. No font downloads, JavaScript frameworks or polyfills for evergreen browsers. 🐦🌲
-
-## How it works
-
-When Utterances loads, the GitHub [issue search API](https://developer.github.com/v3/search/#search-issues) is used to find the issue associated with the page based on url, pathname or title. If it cannot find an issue that matches the page, [utterances-bot](https://github.com/utterances-bot) will automatically create an issue the first time someone comments.
-
-To comment, users must authorize the utterances app to post on their behalf using the GitHub [OAuth flow](https://developer.github.com/v3/oauth/#web-application-flow). Alternatively, users can comment on the GitHub issue directly.
-
-# Setting up Utterances
-
-### Repository
-
-Choose the repository utterances will connect to.
-
-Make sure the repo is public, otherwise your readers will not be able to view the issues/comments.
-Make sure the utterances app is installed on the repo, otherwise users will not be able to post comments.
-If your repo is a fork, navigate to its settings tab and confirm the issues feature is turned on.
-
-```
-repo:
- username/repo
-```
-
-A public GitHub repository. This is where the blog post issues and issue-comments will be posted.
-
-### Theme
-
-Choose an Utterances theme that matches your blog.
-
-### Enable Utterances
-
-Add the following script tag to your blog's template. Position it where you want the comments to appear. Customize the layout using the .utterances and .utterances-frame selectors.
-
-```js
-
-```
-
-The complete documentation can be found at [https://utteranc.es](https://utteranc.es/)
diff --git a/_posts/2023-10-01-obsidian-sync.md b/_posts/2023-10-01-obsidian-sync.md
deleted file mode 100644
index 8f67b2d..0000000
--- a/_posts/2023-10-01-obsidian-sync.md
+++ /dev/null
@@ -1,118 +0,0 @@
----
-title : Setting up Obsidian sync in Windows
-description : Syncing Obsidian in Windows with Windows Task Scheduler with git
-date : 2023-10-01
-tags : [obsidian, git,sync, windows, cron, task scheduler, powershell]
----
-
-Syncing Obsidian in Windows with Windows Task Scheduler and git
-
-
-
-[Obsidian](https://obsidian.md/) is a powerful note-taking and knowledge management tool that has gained a dedicated following among researchers, writers, and knowledge workers. To make the most of Obsidian, it's essential to keep your notes synchronized across devices and ensure your data is regularly backed up.Obsidian is the private and flexible writing app that adapts to the way you think.
-
-Obsidian is free for personal use.It does not charge based on features or usage.You only pay if you use Obsidian commercially.
-
-In this article, we'll guide you through the process of setting up automated synchronization for your Obsidian vault on Windows using Windows Task Scheduler and a PowerShell script.[^note]
-
-## Prerequisites
-
-Before we dive into setting up the synchronization task, ensure you have the following prerequisites in place:
-
-1. **Obsidian Installed:** Make sure Obsidian is [installed](https://obsidian.md/download) on your Windows computer, and you have an existing Obsidian vault that you want to sync.
-
-1. **Git Installed:** You'll need Git installed and configured with your Obsidian vault's repository. If you haven't already done this, you can download Git from the [official website](https://git-scm.com/downloads) and follow the installation instructions.
-
-1. **PowerShell Script:** The provided PowerShell script, sync.ps1, should be located in your Obsidian vault folder.
-
-## Understanding the PowerShell Script
-
-The provided PowerShell script, sync.ps1, is the heart of our synchronization task. It automates the process of committing changes in your Obsidian vault's Git repository and pushing them to your remote repository (e.g., GitHub or GitLab). Here's a brief overview of the script:
-
-```ps1
-# Define the folder path
-$FolderPath = "C:\path\to\obsidian-vault"
-
-# Change directory to the repository folder
-Set-Location -Path $FolderPath
-
-# Check if the working tree is clean
-$IsClean = (git diff-index --quiet HEAD --) -or (git diff-files --quiet)
-
-if ($IsClean) {
- Write-Host "Working tree is clean. Skipping commit and pushing changes."
- git push
-} else {
- # Get the current date in the desired format (Day - Date)
- $CommitMessage = "$(Get-Date -Format 'dddd - yyyy-MM-dd HH:mm:ss')"
-
- # Commit the changes
- git add .
- git commit -m $CommitMessage
-
- # Push the changes
- git push
-}
-```
-
-This script does the following:
-
-- Sets the folder path to your Obsidian vault.
-- Checks if there are any changes to commit. If the vault is clean (no changes), it skips the commit and only pushes changes.
-- If there are changes, it commits them with a timestamped message and then pushes them to the remote repository.
-
-## Setting up Windows Task Scheduler
-
-Now that we have our PowerShell script ready, let's set up a scheduled task using Windows Task Scheduler to automate the synchronization process. Follow these steps:
-
-1. **Open an Elevated PowerShell Prompt:** To run the necessary commands, open PowerShell as an administrator.
-
-1. **Define Task Variables:** Execute the following commands to define variables for your task:
-
- ```ps1
- $ScriptPath = "C:\path\to\obsidian-vault\sync.ps1"
- $TaskName = "obsidian-sync"
- $UserAccount = "$env:USERDOMAIN\$env:USERNAME"
- ```
-
- Replace $ScriptPath with the actual path to your sync.ps1 script, $TaskName with a name for your task.
-
-1. **Configure Task Trigger:** Set up a trigger for your task. In this example, we'll schedule the task to run daily at 9:00 PM:
-
- ```ps1
- $Trigger = New-ScheduledTaskTrigger -Daily -At '9:00 PM'
- ```
-
- You can adjust the schedule according to your preference.
-
-1. Define Task Principal and Settings: Configure the task's principal (the user account under which the task will run) and settings:
-
- ```ps1
- $Principal = New-ScheduledTaskPrincipal -UserId $UserAccount -RunLevel Highest
- $Settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -RunOnlyIfNetworkAvailable -WakeToRun
- ```
-
- These settings ensure that the task runs with the necessary privileges and conditions.
-
-1. **Define Task Action:** Specify the action that the task will perform, which is running the PowerShell script:
-
- ```ps1
- $Action = New-ScheduledTaskAction -Execute 'PowerShell.exe' -Argument "-ExecutionPolicy Bypass -WindowStyle Hidden -File `"$ScriptPath`""
- ```
-
- This action runs PowerShell with the provided script.
-
-1. **Create the Scheduled Task:** Finally, create the scheduled task and register it with Windows Task Scheduler:
-
- ```ps1
- $Task = New-ScheduledTask -Action $Action -Trigger $Trigger -Principal $Principal -Settings $Settings
- Register-ScheduledTask -TaskName $TaskName -InputObject $Task
- ```
-
-The Obsidian synchronization task is now set up and ready to run automatically based on the schedule you defined.
-
-# Inspiration
-
-When looking up on how to implement this I found some breakthrough from this [stack overflow](https://stackoverflow.com/questions/7195503/setting-up-a-cron-job-in-windows) post. There are suggestions on how to do this using cron jobs in wsl. They are worth a look at. This article on [powershell](https://learn.microsoft.com/en-us/powershell/module/scheduledtasks/new-scheduledtask?view=windowsserver2022-ps) with windows server was also helpful.
-
-[^note]: This method is only optimal for desktop sync. To sync across devices obsidian has a paid plan that has some extra features Such as Sync notes across devices, End-to-end encryption, Version history, Priority email support. Consider checking it out at [https://obsidian.md/pricing](https://obsidian.md/pricing)
diff --git a/_posts/2024-01-17-javascript-exporting-modules.md b/_posts/2024-01-17-javascript-exporting-modules.md
deleted file mode 100644
index 80e2516..0000000
--- a/_posts/2024-01-17-javascript-exporting-modules.md
+++ /dev/null
@@ -1,185 +0,0 @@
----
-title : Export default and module.exports in Javascript
-date : 2024-01-17
-tags : [javascript, node]
----
-
-Javascript is a popular programming language that can run both in the browser and on the server. However, different environments may have different ways of organizing and importing Javascript modules. In this article, we will compare two common methods of exporting and importing modules: **export default** and **module.exports**.
-
-
-## What are modules?
-Modules are reusable pieces of code that can be separated into different files. Modules can export values, functions, classes, or objects that can be imported by other modules. This way, modules can avoid polluting the global scope and enable code reuse and modularity.
-
-## How to export modules in Node.js?
-Node.js is a runtime environment that allows Javascript to run on the server. Node.js uses a module system called CommonJS, which is based on the require and module.exports syntax.
-
-To export a module in Node.js, you can assign the value that you want to export to the module.exports object. For example:
-
-```javascript
-// my-module.js
-// export a function
-module.exports = function add(a, b) {
- return a + b;
-};
-
-// export an object
-module.exports = {
- name: "Alice",
- age: 25,
-};
-```
-
-To import a module in Node.js, you can use the require function and pass the path of the module file as an argument. The require function will return the value of module.exports from the module file. For example:
-
-```javascript
-// main.js
-// import a function
-const add = require("./my-module.js");
-console.log(add(2, 3)); // 5
-
-// import an object
-const person = require("./my-module.js");
-console.log(person.name); // Alice
-console.log(person.age); // 25
-```
-
-Note that Node.js will cache the modules that are imported with require, so if you import the same module multiple times, you will get the same instance of the module.
-
-## How to export modules in ES6?
-ES6 is the version of Javascript that introduced many new features, including a native module system. ES6 modules use the `import` and `export` syntax.
-
-To export a module in ES6, you can use the `export` keyword followed by the declaration of the value that you want to export. You can also use the export keyword with curly braces to export a list of named values. For example:
-
-```javascript
-// my-module.js
-// export a function
-export function add(a, b) {
- return a + b;
-}
-
-// export a class
-export class Person {
- constructor(name, age) {
- this.name = name;
- this.age = age;
- }
-}
-
-// export an object
-export const person = {
- name: "Alice",
- age: 25,
-};
-```
-
-To import a module in ES6, you can use the `import` keyword followed by the name of the value that you want to import and the path of the module file. You can also use the import keyword with curly braces to import a list of named values. For example:
-
-```javascript
-// main.js
-// import a function
-import { add } from "./my-module.js";
-console.log(add(2, 3)); // 5
-
-// import a class
-import { Person } from "./my-module.js";
-const person = new Person("Bob", 30);
-console.log(person.name); // Bob
-console.log(person.age); // 30
-
-// import an object
-import { person as Alice } from "./my-module.js";
-console.log(Alice.name); // Alice
-console.log(Alice.age); // 25
-```
-Note that ES6 modules are imported and executed only once, so if you import the same module multiple times, you will get the same instance of the module.
-
-## What is the difference between export default and module.exports?
-One of the main differences between export default and module.exports is that export default is an ES6 feature, while module.exports is a CommonJS feature. Therefore, they are not compatible with each other by default. However, some tools like Babel or Webpack can transpile ES6 modules to CommonJS modules, or vice versa, to make them work together.
-
-Another difference is that export default can only export one value per module, while module.exports can export any value, including multiple values. For example:
-
-```javascript
-// my-module.js
-// export default a function
-export default function add(a, b) {
- return a + b;
-}
-
-// export default an object
-export default {
- name: "Alice",
- age: 25,
-};
-
-// export default a class
-export default class Person {
- constructor(name, age) {
- this.name = name;
- this.age = age;
- }
-}
-```
-
-```javascript
-// my-module.js
-// export a function
-module.exports = function add(a, b) {
- return a + b;
-};
-
-// export an object
-module.exports = {
- name: "Alice",
- age: 25,
-};
-
-// export a class
-module.exports = class Person {
- constructor(name, age) {
- this.name = name;
- this.age = age;
- }
-};
-```
-
-Note that you can only have one export default statement per module, but you can have multiple module.exports statements. However, each module.exports statement will overwrite the previous one, so only the last one will be exported.
-
-To import a default export, you can use the import keyword without curly braces and assign any name to the imported value. For example:
-
-```javascript
-// main.js
-// import a default export
-import add from "./my-module.js";
-console.log(add(2, 3)); // 5
-
-// import another default export
-import person from "./my-module.js";
-console.log(person.name); // Alice
-console.log(person.age); // 25
-
-// import another default export
-import Person from "./my-module.js";
-const person = new Person("Bob", 30);
-console.log(person.name); // Bob
-console.log(person.age); // 30
-```
-
-To import a module.exports value, you can use the require function and assign any name to the imported value. For example:
-```javascript
-// main.js
-// import a module.exports value
-const add = require("./my-module.js");
-console.log(add(2, 3)); // 5
-
-// import another module.exports value
-const person = require("./my-module.js");
-console.log(person.name); // Alice
-console.log(person.age); // 25
-
-// import another module.exports value
-const Person = require("./my-module.js");
-const person = new Person("Bob", 30);
-console.log(person.name); // Bob
-console.log(person.age); // 30
-```
-Node’s JavaScript has diverged from that of the browser. Understanding both CommonJS modules and ES6 modules is your first step in becoming a 10X developer. Happy coding!
\ No newline at end of file
diff --git a/_tabs/about.md b/_tabs/about.md
deleted file mode 100644
index c97b871..0000000
--- a/_tabs/about.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# the default layout is 'page'
-icon: fas fa-info-circle
-order: 4
----
-
-I spend my free time working on hobby projects and sometimes I write about my experiences. In particular, I enjoy learning about programming languages,high performance computing, and how to write fast, robust, and secure code.
\ No newline at end of file
diff --git a/_tabs/archives.md b/_tabs/archives.md
deleted file mode 100644
index c3abc59..0000000
--- a/_tabs/archives.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-layout: archives
-icon: fas fa-archive
-order: 3
----
diff --git a/_tabs/categories.md b/_tabs/categories.md
deleted file mode 100644
index 2d241be..0000000
--- a/_tabs/categories.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-layout: categories
-icon: fas fa-stream
-order: 1
----
diff --git a/_tabs/tags.md b/_tabs/tags.md
deleted file mode 100644
index ded3adc..0000000
--- a/_tabs/tags.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-layout: tags
-icon: fas fa-tags
-order: 2
----
diff --git a/assets/img/favicons/android-chrome-192x192.png b/assets/img/favicons/android-chrome-192x192.png
deleted file mode 100644
index 1f97871..0000000
Binary files a/assets/img/favicons/android-chrome-192x192.png and /dev/null differ
diff --git a/assets/img/favicons/android-chrome-512x512.png b/assets/img/favicons/android-chrome-512x512.png
deleted file mode 100644
index d849799..0000000
Binary files a/assets/img/favicons/android-chrome-512x512.png and /dev/null differ
diff --git a/assets/img/favicons/apple-touch-icon.png b/assets/img/favicons/apple-touch-icon.png
deleted file mode 100644
index cbf1fac..0000000
Binary files a/assets/img/favicons/apple-touch-icon.png and /dev/null differ
diff --git a/assets/img/favicons/favicon-16x16.png b/assets/img/favicons/favicon-16x16.png
deleted file mode 100644
index 2322233..0000000
Binary files a/assets/img/favicons/favicon-16x16.png and /dev/null differ
diff --git a/assets/img/favicons/favicon-32x32.png b/assets/img/favicons/favicon-32x32.png
deleted file mode 100644
index e7c7bc1..0000000
Binary files a/assets/img/favicons/favicon-32x32.png and /dev/null differ
diff --git a/assets/img/favicons/favicon.ico b/assets/img/favicons/favicon.ico
deleted file mode 100644
index d06fa55..0000000
Binary files a/assets/img/favicons/favicon.ico and /dev/null differ
diff --git a/static/fonts/NotoSans.ttf b/static/fonts/NotoSans.ttf
deleted file mode 100644
index 7552fbe..0000000
Binary files a/static/fonts/NotoSans.ttf and /dev/null differ
diff --git a/static/fonts/NotoSansMono.ttf b/static/fonts/NotoSansMono.ttf
deleted file mode 100644
index b7615d8..0000000
Binary files a/static/fonts/NotoSansMono.ttf and /dev/null differ
diff --git a/static/fonts/NotoSerif.ttf b/static/fonts/NotoSerif.ttf
deleted file mode 100644
index 3aa8999..0000000
Binary files a/static/fonts/NotoSerif.ttf and /dev/null differ
diff --git a/static/images/uploads/mux.png b/static/images/uploads/mux.png
deleted file mode 100644
index d0d930d..0000000
Binary files a/static/images/uploads/mux.png and /dev/null differ
diff --git a/static/images/uploads/pipx.png b/static/images/uploads/pipx.png
deleted file mode 100644
index f032d22..0000000
Binary files a/static/images/uploads/pipx.png and /dev/null differ
diff --git a/static/images/uploads/react.png b/static/images/uploads/react.png
deleted file mode 100644
index 7a31b89..0000000
Binary files a/static/images/uploads/react.png and /dev/null differ
diff --git a/static/self.png b/static/self.png
deleted file mode 100644
index efa063f..0000000
Binary files a/static/self.png and /dev/null differ
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