Harvey
As one does: I wrote my own static site generator for photography galleries.
I had Ghost installed on a dedicated VM but that felt like a very heavy solution. Ghost has more features than I need. The most recent security advisory was a bit shocking: "This vulnerability is present in Ghost v3.24.0 to v6.19.0." This was the spark I needed to write my own.
My static site generator is code-named harvey named for photographer Harvey Stein. It is a minimalist HTML image gallery tool written in Go that produces websites.
I'm using it for these websites:
FEATURES
- Galleries defined in a YAML file
- Masonry image grids
- Click to view image in a lightbox
- Galleries have back/next links
- Responsive attributes: width/height read from image files at build time (prevents layout from shifting during page load)
- Also included: Sitemap, RSS feed, OpenGraph meta tags, robots.txt, favicon
The templates are standard Go html/template files with shared blocks: header, navigation and footer with per-site overrides.
My build.sh script compiles two Go programs: harvey (generator) and a custom httpd (web server). The script takes an argument, the name of the site to build.
The publish.sh script builds a FROM scratch Docker container with only the web server binary and about 7MB of static files. The Docker container is pushed to a private registry then deployed via Nomad.
Images are not baked into the container. They live on a CephFS-backed Nomad host volume mounted on each Nomad client.
Afterthought: I made a custom interface that allows me to add a new gallery and upload files. The daemon listens on a Tailscale address, meaning no auth is required, and edits my YAML files directly.
