How I build this site

The Ask

Why not using xxx?

Static website generators

I have tried Jekyll, Hugo and Docusaurus for my personal website. These are all good tools for serving lots of static contents, but they distract individual users from focusing on the content. Lots of StagicGens have evolved very quickly to add more features. As an example, Hugo has 17 releases in Q4 2024. This outpaces my speed of publishing new pages, which means I need to read the release notes and update the toolchain before I start publishing. Also, these tools need to be deployed somewhere, which means you will need to login to that specific server or pc to run it, in order to publish content.

Markdown

HTML is already a markup language. Problems with Markdown include:

My way

Tools

I write articles in semantic HTML directly, without using Markdown and converter. A small js script dynamiclly loads css, header (including navigation bar) and footer and inject into DOM of each page. The hand-coded css that is less than 50 lines of code, which handles automatic light/dark theme. The HTML template is kept to its minimum with only skeletons. You can view the related files below:
curl https://azh.me/js/common.js
curl https://azh.me/template.html
curl https://azh.me/components/header.html
curl https://azh.me/css/style.css 

Writing

Just copy template.html and create a new article, that's OK. I save draft articles same as finished ones - they are just not linked to any of existing pages so readers won't see them.

Backup and version control

A script backs up all files to my private git repository on a daily basis.

Publish

All files are served using OpenBSD's httpd. I did not use rewrite rules to eliminate the .html suffix. Instead, the html files are saved without suffix, and I added below to httpd.conf.
default type text/html
These files are published to the server using rsync.

Visitor info

No Google Analytics. From /var/www/logs/access.log I can see visitor's IP and page visits directly.