sals.place

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:

  1. Generate backlink data (see below).
  2. Build the site with Hugo to an environment-specific subdirectory (staging/ or production/) to avoid deploying the wrong assets.
  3. 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.
  4. Do a dry run with rsync to preview which files will be modified.
  5. Prompt to confirm deploy.
  6. Run rsync for real. (A “wet” run? Yuck.)
  7. Print the environment-specific URLs to test, such as my RSS feed’s page in Miniflux.

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.

See also


Tags

Backlinks

  1. About me and this place