Colophon
This page describes the technical details of my site and how I manage it.
Tooling and source code
This blog is a static site built with Hugo. The source lives on my homelab in a git repository. I edit the blog remotely with my text editor du jour.
Deployment
I deploy the site to pgs.sh using rsync.
I use a Makefile to manage my various admin scripts.
I run make deploy_staging and make deploy_prod to kick off deploys, which include the following steps:
- Generate backlink data (see below).
- Build the site with Hugo to an environment-specific subdirectory (
staging/orproduction/) to avoid deploying the wrong assets. - Run some checks against the built site to ensure:
- no drafts are present,
- all internal links are valid, and
- my RSS feed link is correct.
- Do a dry run with rsync to preview which files will be modified.
- Prompt to confirm deploy.
- Run rsync for real. (A “wet” run? Yuck.)
- Print the environment-specific URLs to test, such as my RSS feed’s page in Miniflux.
Backlinks
My pages have Obsidian-esque backlinks.
Before a build, a custom Golang script scans my Markdown files and writes the link mapping data to data/backlinks.json, making that file a
Hugo data source.
Then, a Hugo template reads the data and generates the backlinks HTML on each page.