Hugo impressions after a couple of days
I’ve been using Hugo (on Netlify) for a while and getting used to my new blogging setup (plus as expected somehow feeling more inclined to write). During that time, I did run into a few quirks(?) of my current setup.
First, I set a date in the future for a post so that it gets published at a later date, but turns out it wasn’t. The reason, very obviously, was that the
public directory is statically generated at build time. That’s what a static website generator does. It (sadly) won’t magically start serving that new post once the time comes. Triggering a build in the Netlify portal does the trick, though that’s an additional manual step. I’m thinking of perhaps using GitHub Actions to automate that part in the near(?) future. The steps are pretty simple actually: daily check if there’s a draft with a future publishing date and if so remove the draft tag and commit/push. To prevent actual drafts from being published perhaps I should add a
One other thing I ran into early on was that there doesn’t seem to be a lot of themes available, especially actively/frequently maintained ones. I was looking at a mkdocs-material equivalent theme for use on another project and none seem to be actively maintained anymore. Writing one myself or maintaining a fork is of course an option, and Hudo makes it a reasonably easy thing to do. While that may work for a personal blog, this may not be the case for corporate environments and I’m pretty sure nobody in my department would want to invest time doing frontend work.
Search and i8n, l10n are for the time being areas I haven’t investigated much yet, but from a preliminary look,
lunr.js is used for search when enabled in themes, and Hugo seems to provide support for Elasticsearch, which is great since
lunr.js has performance issues with large indices.