I had been considering a blog for a while, mostly to hold what I have learned about various things. I did not want to relearn those hard-won bits of knowledge the next time I needed them, so I kept a private collection of notes. I also believe sharing is a good thing, and I wanted to make those notes available to anyone who might find them useful.

Choosing Hugo

While working with Gramps, I became aware of one of its developers, David Straub. When he revamped his personal website, I learned of Hugo, which met my list of criteria for a blog system and was similar to what he described.

Removing the theme

I started with the Ananke theme. I liked it, but then I came across Greg Vedders’s Rebuilding gregvedders.com Without a Hugo Theme, which was very close to what I was already doing. I was inspired to simplify by dropping the theme, which had added features and complexity I neither used nor needed. With some help from ChatGPT, I reworked the site to use Hugo without an external theme. The layouts and CSS live directly in this repository, so the site carries only the pieces it uses.

Adding search without a server

In that same Greg Vedder article I learned about Pagefind and included that as well. Being able to have search available while still maintaining a completely static site, and thus much less complex, site is a huge benefit.

How it fits together

  • Templates and styling. Ordinary Hugo templates under layouts/ and a small stylesheet under assets/css/. The Hugo documentation covers the templating and content model.
  • Search. Pagefind builds a search index at deploy time, which provides search while keeping the site completely static.
  • Source. Everything is on GitHub if you want a closer look.

Installing Hugo on Fedora

Hugo is available in the Fedora repositories (see Hugo’s Linux installation notes for other options):

sudo dnf --refresh install golang hugo

Making it automated

Once the site was functioning well, making it easy to update was the next priority. This is pretty straightforward from a technical standpoint. Manage the whole site with git version control, commiting changes to GitHub and use GitHub’s continuous integration (CI) model use a GitHub action to build and rsync the site whenever changes are pushed to GitHub.

References