From a1f6a1fa6fe140c36d8fe9675114400c1165d255 Mon Sep 17 00:00:00 2001
From: andwati
Date: Mon, 4 Aug 2025 23:27:49 +0300
Subject: [PATCH] init1
---
.gitignore | 1 +
Makefile | 19 +
README.md | 46 +++
bin/update-zola | 62 +++
config.toml | 23 ++
content/_index.md | 12 +
content/archive/_index.md | 4 +
content/contact.md | 10 +
content/posts/_index.md | 7 +
content/posts/a-fresh-coat-of-paint.md | 58 +++
content/posts/file-over-app.md | 17 +
content/posts/generate-django-secret-key.md | 41 ++
content/posts/hello-world.md | 36 ++
content/posts/inertia.md | 23 ++
...tgresql-15-on-arch-manjaro-garuda-linux.md | 172 +++++++++
content/posts/integrating-netlify.md | 159 ++++++++
content/posts/javascript-exporting-modules.md | 192 ++++++++++
content/posts/linux-permissions.md | 15 +
content/posts/obsidian-sync.md | 120 ++++++
...mantic-version-and-conventional-commits.md | 89 +++++
content/posts/subresource-integrity.md | 122 ++++++
content/posts/utterances-comments.md | 67 ++++
content/posts/vuejs-tailwind.md | 119 ++++++
sass/site.scss | 362 ++++++++++++++++++
static/404.mp4 | Bin 0 -> 1080389 bytes
static/50x.html | 54 +++
static/50x.mp4 | Bin 0 -> 1837971 bytes
static/favicon.svg | 3 +
static/fonts/KaTeX_AMS-Regular.ttf | Bin 0 -> 63632 bytes
static/fonts/KaTeX_AMS-Regular.woff | Bin 0 -> 33516 bytes
static/fonts/KaTeX_AMS-Regular.woff2 | Bin 0 -> 28076 bytes
static/fonts/KaTeX_Caligraphic-Bold.ttf | Bin 0 -> 12368 bytes
static/fonts/KaTeX_Caligraphic-Bold.woff | Bin 0 -> 7716 bytes
static/fonts/KaTeX_Caligraphic-Bold.woff2 | Bin 0 -> 6912 bytes
static/fonts/KaTeX_Caligraphic-Regular.ttf | Bin 0 -> 12344 bytes
static/fonts/KaTeX_Caligraphic-Regular.woff | Bin 0 -> 7656 bytes
static/fonts/KaTeX_Caligraphic-Regular.woff2 | Bin 0 -> 6908 bytes
static/fonts/KaTeX_Fraktur-Bold.ttf | Bin 0 -> 19584 bytes
static/fonts/KaTeX_Fraktur-Bold.woff | Bin 0 -> 13296 bytes
static/fonts/KaTeX_Fraktur-Bold.woff2 | Bin 0 -> 11348 bytes
static/fonts/KaTeX_Fraktur-Regular.ttf | Bin 0 -> 19572 bytes
static/fonts/KaTeX_Fraktur-Regular.woff | Bin 0 -> 13208 bytes
static/fonts/KaTeX_Fraktur-Regular.woff2 | Bin 0 -> 11316 bytes
static/fonts/KaTeX_Main-Bold.ttf | Bin 0 -> 51336 bytes
static/fonts/KaTeX_Main-Bold.woff | Bin 0 -> 29912 bytes
static/fonts/KaTeX_Main-Bold.woff2 | Bin 0 -> 25324 bytes
static/fonts/KaTeX_Main-BoldItalic.ttf | Bin 0 -> 32968 bytes
static/fonts/KaTeX_Main-BoldItalic.woff | Bin 0 -> 19412 bytes
static/fonts/KaTeX_Main-BoldItalic.woff2 | Bin 0 -> 16780 bytes
static/fonts/KaTeX_Main-Italic.ttf | Bin 0 -> 33580 bytes
static/fonts/KaTeX_Main-Italic.woff | Bin 0 -> 19676 bytes
static/fonts/KaTeX_Main-Italic.woff2 | Bin 0 -> 16988 bytes
static/fonts/KaTeX_Main-Regular.ttf | Bin 0 -> 53580 bytes
static/fonts/KaTeX_Main-Regular.woff | Bin 0 -> 30772 bytes
static/fonts/KaTeX_Main-Regular.woff2 | Bin 0 -> 26272 bytes
static/fonts/KaTeX_Math-BoldItalic.ttf | Bin 0 -> 31196 bytes
static/fonts/KaTeX_Math-BoldItalic.woff | Bin 0 -> 18668 bytes
static/fonts/KaTeX_Math-BoldItalic.woff2 | Bin 0 -> 16400 bytes
static/fonts/KaTeX_Math-Italic.ttf | Bin 0 -> 31308 bytes
static/fonts/KaTeX_Math-Italic.woff | Bin 0 -> 18748 bytes
static/fonts/KaTeX_Math-Italic.woff2 | Bin 0 -> 16440 bytes
static/fonts/KaTeX_SansSerif-Bold.ttf | Bin 0 -> 24504 bytes
static/fonts/KaTeX_SansSerif-Bold.woff | Bin 0 -> 14408 bytes
static/fonts/KaTeX_SansSerif-Bold.woff2 | Bin 0 -> 12216 bytes
static/fonts/KaTeX_SansSerif-Italic.ttf | Bin 0 -> 22364 bytes
static/fonts/KaTeX_SansSerif-Italic.woff | Bin 0 -> 14112 bytes
static/fonts/KaTeX_SansSerif-Italic.woff2 | Bin 0 -> 12028 bytes
static/fonts/KaTeX_SansSerif-Regular.ttf | Bin 0 -> 19436 bytes
static/fonts/KaTeX_SansSerif-Regular.woff | Bin 0 -> 12316 bytes
static/fonts/KaTeX_SansSerif-Regular.woff2 | Bin 0 -> 10344 bytes
static/fonts/KaTeX_Script-Regular.ttf | Bin 0 -> 16648 bytes
static/fonts/KaTeX_Script-Regular.woff | Bin 0 -> 10588 bytes
static/fonts/KaTeX_Script-Regular.woff2 | Bin 0 -> 9644 bytes
static/fonts/KaTeX_Size1-Regular.ttf | Bin 0 -> 12228 bytes
static/fonts/KaTeX_Size1-Regular.woff | Bin 0 -> 6496 bytes
static/fonts/KaTeX_Size1-Regular.woff2 | Bin 0 -> 5468 bytes
static/fonts/KaTeX_Size2-Regular.ttf | Bin 0 -> 11508 bytes
static/fonts/KaTeX_Size2-Regular.woff | Bin 0 -> 6188 bytes
static/fonts/KaTeX_Size2-Regular.woff2 | Bin 0 -> 5208 bytes
static/fonts/KaTeX_Size3-Regular.ttf | Bin 0 -> 7588 bytes
static/fonts/KaTeX_Size3-Regular.woff | Bin 0 -> 4420 bytes
static/fonts/KaTeX_Size3-Regular.woff2 | Bin 0 -> 3624 bytes
static/fonts/KaTeX_Size4-Regular.ttf | Bin 0 -> 10364 bytes
static/fonts/KaTeX_Size4-Regular.woff | Bin 0 -> 5980 bytes
static/fonts/KaTeX_Size4-Regular.woff2 | Bin 0 -> 4928 bytes
static/fonts/KaTeX_Typewriter-Regular.ttf | Bin 0 -> 27556 bytes
static/fonts/KaTeX_Typewriter-Regular.woff | Bin 0 -> 16028 bytes
static/fonts/KaTeX_Typewriter-Regular.woff2 | Bin 0 -> 13568 bytes
static/google52b8421f5e6826b8.html | 1 +
static/js/auto-render.min.js | 1 +
static/js/katex.min.js | 1 +
static/katex.min.css | 1 +
templates/404.html | 40 ++
templates/_partials/comments.html | 9 +
templates/_partials/footer.html | 20 +
templates/_partials/head.html | 83 ++++
templates/anchor-link.html | 1 +
templates/archive.html | 26 ++
templates/index.html | 64 ++++
templates/page.html | 36 ++
templates/post.html | 42 ++
templates/post_macros.html | 26 ++
templates/posts.html | 14 +
templates/section.html | 35 ++
templates/tags/list.html | 39 ++
templates/tags/single.html | 35 ++
106 files changed, 2307 insertions(+)
create mode 100644 .gitignore
create mode 100755 Makefile
create mode 100644 README.md
create mode 100755 bin/update-zola
create mode 100644 config.toml
create mode 100644 content/_index.md
create mode 100644 content/archive/_index.md
create mode 100644 content/contact.md
create mode 100644 content/posts/_index.md
create mode 100644 content/posts/a-fresh-coat-of-paint.md
create mode 100644 content/posts/file-over-app.md
create mode 100644 content/posts/generate-django-secret-key.md
create mode 100644 content/posts/hello-world.md
create mode 100644 content/posts/inertia.md
create mode 100644 content/posts/install-postgresql-15-on-arch-manjaro-garuda-linux.md
create mode 100644 content/posts/integrating-netlify.md
create mode 100644 content/posts/javascript-exporting-modules.md
create mode 100644 content/posts/linux-permissions.md
create mode 100644 content/posts/obsidian-sync.md
create mode 100644 content/posts/semantic-version-and-conventional-commits.md
create mode 100644 content/posts/subresource-integrity.md
create mode 100644 content/posts/utterances-comments.md
create mode 100644 content/posts/vuejs-tailwind.md
create mode 100644 sass/site.scss
create mode 100644 static/404.mp4
create mode 100644 static/50x.html
create mode 100644 static/50x.mp4
create mode 100644 static/favicon.svg
create mode 100644 static/fonts/KaTeX_AMS-Regular.ttf
create mode 100644 static/fonts/KaTeX_AMS-Regular.woff
create mode 100644 static/fonts/KaTeX_AMS-Regular.woff2
create mode 100644 static/fonts/KaTeX_Caligraphic-Bold.ttf
create mode 100644 static/fonts/KaTeX_Caligraphic-Bold.woff
create mode 100644 static/fonts/KaTeX_Caligraphic-Bold.woff2
create mode 100644 static/fonts/KaTeX_Caligraphic-Regular.ttf
create mode 100644 static/fonts/KaTeX_Caligraphic-Regular.woff
create mode 100644 static/fonts/KaTeX_Caligraphic-Regular.woff2
create mode 100644 static/fonts/KaTeX_Fraktur-Bold.ttf
create mode 100644 static/fonts/KaTeX_Fraktur-Bold.woff
create mode 100644 static/fonts/KaTeX_Fraktur-Bold.woff2
create mode 100644 static/fonts/KaTeX_Fraktur-Regular.ttf
create mode 100644 static/fonts/KaTeX_Fraktur-Regular.woff
create mode 100644 static/fonts/KaTeX_Fraktur-Regular.woff2
create mode 100644 static/fonts/KaTeX_Main-Bold.ttf
create mode 100644 static/fonts/KaTeX_Main-Bold.woff
create mode 100644 static/fonts/KaTeX_Main-Bold.woff2
create mode 100644 static/fonts/KaTeX_Main-BoldItalic.ttf
create mode 100644 static/fonts/KaTeX_Main-BoldItalic.woff
create mode 100644 static/fonts/KaTeX_Main-BoldItalic.woff2
create mode 100644 static/fonts/KaTeX_Main-Italic.ttf
create mode 100644 static/fonts/KaTeX_Main-Italic.woff
create mode 100644 static/fonts/KaTeX_Main-Italic.woff2
create mode 100644 static/fonts/KaTeX_Main-Regular.ttf
create mode 100644 static/fonts/KaTeX_Main-Regular.woff
create mode 100644 static/fonts/KaTeX_Main-Regular.woff2
create mode 100644 static/fonts/KaTeX_Math-BoldItalic.ttf
create mode 100644 static/fonts/KaTeX_Math-BoldItalic.woff
create mode 100644 static/fonts/KaTeX_Math-BoldItalic.woff2
create mode 100644 static/fonts/KaTeX_Math-Italic.ttf
create mode 100644 static/fonts/KaTeX_Math-Italic.woff
create mode 100644 static/fonts/KaTeX_Math-Italic.woff2
create mode 100644 static/fonts/KaTeX_SansSerif-Bold.ttf
create mode 100644 static/fonts/KaTeX_SansSerif-Bold.woff
create mode 100644 static/fonts/KaTeX_SansSerif-Bold.woff2
create mode 100644 static/fonts/KaTeX_SansSerif-Italic.ttf
create mode 100644 static/fonts/KaTeX_SansSerif-Italic.woff
create mode 100644 static/fonts/KaTeX_SansSerif-Italic.woff2
create mode 100644 static/fonts/KaTeX_SansSerif-Regular.ttf
create mode 100644 static/fonts/KaTeX_SansSerif-Regular.woff
create mode 100644 static/fonts/KaTeX_SansSerif-Regular.woff2
create mode 100644 static/fonts/KaTeX_Script-Regular.ttf
create mode 100644 static/fonts/KaTeX_Script-Regular.woff
create mode 100644 static/fonts/KaTeX_Script-Regular.woff2
create mode 100644 static/fonts/KaTeX_Size1-Regular.ttf
create mode 100644 static/fonts/KaTeX_Size1-Regular.woff
create mode 100644 static/fonts/KaTeX_Size1-Regular.woff2
create mode 100644 static/fonts/KaTeX_Size2-Regular.ttf
create mode 100644 static/fonts/KaTeX_Size2-Regular.woff
create mode 100644 static/fonts/KaTeX_Size2-Regular.woff2
create mode 100644 static/fonts/KaTeX_Size3-Regular.ttf
create mode 100644 static/fonts/KaTeX_Size3-Regular.woff
create mode 100644 static/fonts/KaTeX_Size3-Regular.woff2
create mode 100644 static/fonts/KaTeX_Size4-Regular.ttf
create mode 100644 static/fonts/KaTeX_Size4-Regular.woff
create mode 100644 static/fonts/KaTeX_Size4-Regular.woff2
create mode 100644 static/fonts/KaTeX_Typewriter-Regular.ttf
create mode 100644 static/fonts/KaTeX_Typewriter-Regular.woff
create mode 100644 static/fonts/KaTeX_Typewriter-Regular.woff2
create mode 100644 static/google52b8421f5e6826b8.html
create mode 100644 static/js/auto-render.min.js
create mode 100644 static/js/katex.min.js
create mode 100644 static/katex.min.css
create mode 100644 templates/404.html
create mode 100644 templates/_partials/comments.html
create mode 100644 templates/_partials/footer.html
create mode 100644 templates/_partials/head.html
create mode 100644 templates/anchor-link.html
create mode 100644 templates/archive.html
create mode 100644 templates/index.html
create mode 100644 templates/page.html
create mode 100644 templates/post.html
create mode 100644 templates/post_macros.html
create mode 100644 templates/posts.html
create mode 100644 templates/section.html
create mode 100644 templates/tags/list.html
create mode 100644 templates/tags/single.html
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..85a1daf
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/public
\ No newline at end of file
diff --git a/Makefile b/Makefile
new file mode 100755
index 0000000..a4c5eff
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+#!/usr/bin/make -f
+
+.PHONY: all build
+
+BUILD_DIR := public
+
+all: clean build
+
+clean:
+ rm -rfd ./$(BUILD_DIR)
+
+build:
+ zola build
+
+serve:
+ zola serve
+
+update-zola:
+ @./bin/update-zola
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ab5e84c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,46 @@
+# [https://andwati.github.io](https://andwati.github.io)
+## Stack
+- [Zola](https://www.getzola.org/) - Your one-stop static site engine
+Forget dependencies. Everything you need in one binary.
+- [Utterances](https://github.com/utterance/utterances) - A lightweight comments widget built on GitHub issues
+- [Goatcounter](https://www.goatcounter.com/) - GoatCounter is an open source web analytics platform available as a free donation-supported hosted service or self-hosted app. It aims to offer easy to use and meaningful privacy-friendly web analytics as an alternative to Google Analytics or Matomo
+
+## Build
+Fork and rename the repository to `.github.io` .
+
+> **Note**
+> This is only required if you are going to publish the site using github pages.
+
+clone the repository
+
+```sh
+git clone https://github.com//.github.io
+```
+
+```
+cd .github.io
+```
+To launch the development server
+
+```sh
+zola serve
+```
+
+## Deploying
+Currently my copy is deployed to github pages using an actions workflow in `.github/workflows/main.yml`
+
+Check other deploy options and how to setup a custom domain in the zola docs at [https://www.getzola.org/documentation/deployment/github-pages/](https://www.getzola.org/documentation/deployment/github-pages/)
+
+## Adding Content
+The blog post content is in `content/posts`. create a markdown file and copy the front matter from any of the existing posts.
+
+## Setting up the commenting system
+currently just change the repo name in `templates\_partials\comments.html`
+
+## TODO
+- [ ] create new post script
+- [ ] add google analytics
+- [ ] move goatcounter config to config.toml
+- [ ] modularize open graph(og) tags
+- [ ] add favicon to config
+- [ ] add latex support
\ No newline at end of file
diff --git a/bin/update-zola b/bin/update-zola
new file mode 100755
index 0000000..7632e1e
--- /dev/null
+++ b/bin/update-zola
@@ -0,0 +1,62 @@
+#!/usr/bin/env sh
+
+set -e
+
+: ${ZOLA_REPO='https://github.com/getzola/zola'}
+: ${ZOLA_INSTALL_DIR="${HOME}/.cargo/bin"}
+
+# Helpers for ANSI color and logging.
+name="$(basename $0)"; esc=''; reset="${esc}[0m"
+red() { local string="${1}"; echo "${esc}[31m${string}${reset}"; }
+yellow() { local string="${1}"; echo "${esc}[33m${string}${reset}"; }
+green() { local string="${1}"; echo "${esc}[32m${string}${reset}"; }
+blue() { local string="${1}"; echo "${esc}[34m${string}${reset}"; }
+magenta() { local string="${1}"; echo "${esc}[35m${string}${reset}"; }
+log() { local string="${1}"; echo "[$(blue $name)] ${string}"; }
+
+prompt_for_update() {
+ local current="${1}"
+ local latest="${2}"
+
+ [ -n "${current}" ] \
+ && installed="You're using Zola $(yellow $current)" \
+ || installed="Zola is $(red 'not installed')"
+
+ log "${installed}, but $(magenta $latest) is available."
+
+ # Prompt for an update. Exit the entire script if declined.
+ read -p "$(log "Would you like to install Zola $(magenta $latest)? [y/N]: ")" answer
+ case $answer in
+ [Yy]*) log "Downloading Zola $(magenta $latest) from GitHub." ;;
+ [Nn]*|*) log $(red "Aborted!"); exit ;;
+ esac
+}
+
+install_zola() {
+ local version="${1}"
+ local download_url="${ZOLA_REPO}/releases/download/${version}/zola-${version}-x86_64-unknown-linux-gnu.tar.gz"
+
+ curl --progress-bar --location $download_url | tar --gunzip --extract --directory=$ZOLA_INSTALL_DIR --file -
+}
+
+update_zola() {
+ # Find the current Zola version (if any).
+ [ -n "$(which zola 2> /dev/null)" ] && current_version=$(zola --version | awk '{print "v"$2}')
+
+ # Find the latest available Zola version. Use --refs to avoid listing
+ # annotated commit objects that include the dereference syntax '^{}'.
+ # Find more background at https://stackoverflow.com/a/15472310.
+ local latest_version=$(git ls-remote --tags --refs $ZOLA_REPO | # Fetch remote tags.
+ sort -t '/' -k 3 -V | # Sort them by version.
+ tail -n 1 | # Take the latest one.
+ awk -F / '{print $3}') # Return only the tag.
+
+ if [ "${current_version}" != "${latest_version}" ]; then
+ prompt_for_update "${current_version}" "${latest_version}"
+ install_zola "${latest_version}"
+ fi
+
+ log "You're using Zola $(magenta $latest_version). $(green "Everything is up-to-date!")"
+}
+
+update_zola
diff --git a/config.toml b/config.toml
new file mode 100644
index 0000000..698b21d
--- /dev/null
+++ b/config.toml
@@ -0,0 +1,23 @@
+title = "Ian Andwati"
+description = "Ian's website."
+base_url = "https://andwati.github.io"
+minify_html = true
+compile_sass = true
+generate_feeds = true
+feed_filenames = ["rss.xml"]
+taxonomies = [{ name = "tags", feed = false }]
+
+[markdown]
+highlight_code = true
+highlight_theme = "gruvbox-dark"
+
+[link_checker]
+skip_prefixes = [""]
+skip_anchor_prefixes = ["https://github.com/"]
+
+[extra]
+author = "Ian Andwati"
+meta = [
+ { property = "og:title", content = "the og title" },
+ { property = "og:description", content = "the og description" },
+]
diff --git a/content/_index.md b/content/_index.md
new file mode 100644
index 0000000..9ac9846
--- /dev/null
+++ b/content/_index.md
@@ -0,0 +1,12 @@
++++
+title = "Ian Andwati"
+description = "Ian's website."
++++
+# Who Are You and Why Should I Care?
+Hey, there! I'm ian.
+I spend my free time working on [hobby projects] and sometimes I [write] about
+my experiences. In particular, I enjoy learning about programming languages, compilers, databases, and how to write fast, robust, and secure code.
+
+
+[hobby projects]: https://github.com/andwati
+[write]: /posts
diff --git a/content/archive/_index.md b/content/archive/_index.md
new file mode 100644
index 0000000..8406ec7
--- /dev/null
+++ b/content/archive/_index.md
@@ -0,0 +1,4 @@
++++
+sort_by = "date"
+template= "archive.html"
++++
\ No newline at end of file
diff --git a/content/contact.md b/content/contact.md
new file mode 100644
index 0000000..88f0a70
--- /dev/null
+++ b/content/contact.md
@@ -0,0 +1,10 @@
++++
+title = "Contact"
+description = "Let's get in touch."
++++
+You can find me on GitHub as [@andwati]. If you're willing to suffer the `gpg` interface, you can use
+[my key].
+
+
+[@andwati]: https://github.com/andwati
+[my key]: https://github.com/andwati.gpg
diff --git a/content/posts/_index.md b/content/posts/_index.md
new file mode 100644
index 0000000..6fbd10e
--- /dev/null
+++ b/content/posts/_index.md
@@ -0,0 +1,7 @@
++++
+title = "Posts"
+template = "posts.html"
+page_template = "post.html"
+sort_by = "date"
+insert_anchor_links = "left"
++++
diff --git a/content/posts/a-fresh-coat-of-paint.md b/content/posts/a-fresh-coat-of-paint.md
new file mode 100644
index 0000000..03069a1
--- /dev/null
+++ b/content/posts/a-fresh-coat-of-paint.md
@@ -0,0 +1,58 @@
++++
+title = "A Fresh Coat Of Paint"
+description = "Migrating to Zola"
+author = "Ian Andwati"
+date = 2023-08-24
+[taxonomies]
+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/content/posts/file-over-app.md b/content/posts/file-over-app.md
new file mode 100644
index 0000000..effd412
--- /dev/null
+++ b/content/posts/file-over-app.md
@@ -0,0 +1,17 @@
++++
+title = "File over app"
+description = "Take control of your artifacts"
+author = "Ian Andwati"
+draft = true
+date = 2023-12-18
+[taxonomies]
+tags = ["obsidian", "entropy", "notes"]
++++
+
+Take control of your artifacts
+
+
+
+In my endless endevours to find the perfect note taking app led me to obsidian, a note taking software that uses markdown files as the file format. All software is ephemereal in nature and yoour artifacts need to survive the decline of your favorite app. The files you create should be available to you and shouldt rrequire specialized software to access.
+
+Your data shouldt be locked behind a paywall or an authentication system that is not under your control.
\ No newline at end of file
diff --git a/content/posts/generate-django-secret-key.md b/content/posts/generate-django-secret-key.md
new file mode 100644
index 0000000..58b5ea2
--- /dev/null
+++ b/content/posts/generate-django-secret-key.md
@@ -0,0 +1,41 @@
++++
+title = "Django Secret Key Tutorial"
+description = "Managing secrets"
+author = "Ian Andwati"
+date = 2022-11-11T15:34:14.160Z
+[taxonomies]
+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/content/posts/hello-world.md b/content/posts/hello-world.md
new file mode 100644
index 0000000..e0eb680
--- /dev/null
+++ b/content/posts/hello-world.md
@@ -0,0 +1,36 @@
++++
+title = "Hello World"
+description = "Hello world"
+date = 2022-11-04
+author = "Ian Andwati"
+[taxonomies]
+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/content/posts/inertia.md b/content/posts/inertia.md
new file mode 100644
index 0000000..b3bbc3a
--- /dev/null
+++ b/content/posts/inertia.md
@@ -0,0 +1,23 @@
++++
+title = "cognitive inertia"
+description = "inertia"
+author = "Ian Andwati"
+date = 2025-02-26
+[taxonomies]
+tags = ["cognition"]
++++
+
+Staring at the void
+
+
+
+Cognitive inertia is the reason changing our habits can be difficult. If you want to overcome inertia you have to apply a force. I consider myself an eternal student, who is ready to learn anything, or so I thought. It happened but I had not noticed, I had stopped moving forward.
+
+## Metawork
+
+I will define this as the things we do before getting the "real" work doe. Its things like choosing the best IDE or text editor, setting up your coding environment, choosing the best note taking app, or even the 'best' operating system. They are the prerequisites of the actual work.
+
+I had been stuck on this loop, always trying to craft the perfect workflow. Setting up the best personalized linux distro, switching note taking apps, trying out multiple layouts, stylings and technologies for my blog, the list is endless.
+
+All of these metawork took more time thn the actual work; building, active learning and writing. Im going to stop all of these and start doing the important stuff.
+
diff --git a/content/posts/install-postgresql-15-on-arch-manjaro-garuda-linux.md b/content/posts/install-postgresql-15-on-arch-manjaro-garuda-linux.md
new file mode 100644
index 0000000..f7c470d
--- /dev/null
+++ b/content/posts/install-postgresql-15-on-arch-manjaro-garuda-linux.md
@@ -0,0 +1,172 @@
++++
+title ="Install PostgreSQL on Arch | Manjaro | Garuda Linux"
+description = "Getting PostgreSQL up and running on Arch Linux-based distros"
+date = 2023-02-16T15:34:14.160Z
+author = "Ian Andwati"
+[taxonomies]
+tags = ["postgresql", "archlinux", "manjaro", "garuda", "linux"]
++++
+
+# 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 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
+
+To change the postgres user password execute the following command:
+
+```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/content/posts/integrating-netlify.md b/content/posts/integrating-netlify.md
new file mode 100644
index 0000000..56cc85b
--- /dev/null
+++ b/content/posts/integrating-netlify.md
@@ -0,0 +1,159 @@
++++
+title = "Integrating Netlify CMS"
+description = "Integrating netlify cms"
+date = 2022-11-24T15:34:14.160Z
+author = "Ian Andwati"
+[taxonomies]
+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 `