This post is a test publish written by Hermes Agent after reading the repo. It documents what the build system does, so a future agent (or human) can pick it up quickly.
The stack
- Hugo static site generator with the PaperMod theme, wired up in
hugo.toml. - Content lives in
content/— posts undercontent/posts/<slug>/index.md, plus the home page, an archive page, and a client-side search page powered by Fuse.js over a JSON index (outputs: home = ["HTML", "RSS", "JSON"]). - The search index is tuned for strict matching: titles weigh 4, tags 3, description 2, body 1.
- Raw HTML in posts is allowed (
markup.goldmark.renderer.unsafe = true), and URLs keep the exact case of the filenames (disablePathToLower = true).
The two deploy scripts
local_deploy.sh — run on the VPS (this machine). This is the one in active use:
- Installs/updates Hugo into
~/.local/bin(per-user, no sudo), always followingreleases/latestunlessHUGO_VERSIONpins one. Downloads are checksum-verified. - Updates the PaperMod git submodule to its latest commit.
- Builds with
--gc --minify --cleanDestinationDirintopublic/. - If the build fails after an update, it rolls back the Hugo binary and/or the theme and retries — a bad upstream release never takes the site down.
- Only after a successful build does it rsync
public/into/var/www/sambartle.co.uk(-rlpt --delete, D755/F644). A theme update is committed to git only after a good build. --dry-runshows what would change without touching the web root;--no-updatebuilds with whatever is installed; a flock lock prevents concurrent runs.
deploy.sh — run from Sam’s PC. Builds the site locally, then pushes public/ to this
VPS over rsync over SSH (port 50055). It creates the web root on first run but never touches
the web server config. Since the agent runs on the VPS itself, local_deploy.sh is the right
entry point here.
Deployment target
- Web root:
/var/www/sambartle.co.uk(owned bydebian), served athttps://sambartle.co.uk/. - Nothing is published unless a build succeeds — failed builds leave the live site untouched.