reflections on Hugo, GitHub and Netlify
Three years ago I moved my Hugo blog to GitHub Pages and Netlify.
When this end to end process worked successfully, this was brilliant. However, at times, the automated deployment did feel like the game of Mousetrap where a silver ball was released and then proceeded to traverse helter skelters, ride up and down on see-saws, descend zig-zag staircases, cross bridges, trigger catapults, release levers and conquer various hazards before finally launching a bucket to capture a little plastic mouse.
By using GitHub pages and Netlify, I had introduced yet more complexity into the blog publishing process.
Then I decided to add yet another layer of complexity by composing posts in Emacs using Org Mode and using ox-hugo to convert posts to Markdown format.
For the most part, this worked fine which was satisfying and I congratulated myself on my technical wizardry.
However, Hugo occasionally broke after yet another update. Locating and resolving the root cause of these errors was problematic (for me) as the Hugo release notes are very technical and IMHO primarily aimed at Go and/or theme developers. There is hardly ever any section describing breaking (i.e. non backwards compatible) changes or user visible changes.
A random example from the most recent Hugo release (v0.159.0)
This release greatly improves and simplifies management of Node.js/npm dependencies in a multi-module setup. Replace deprecated site.Data with hugo.Data in tests.
Replace deprecated excludeFiles and includeFiles with files in tests.
Replace deprecated :filename with :contentbasename in the permalinks test.
Failure could be caused by a variety of multiple potential issues.
-
Was there an error generating the Markdown from the Org Mode source ?
-
Did Hugo work locally and generate the HTML for the site successfully ? This was normally the most frequent reason for the failure. An Arch update would often update the Hugo package and Hugo updates were quite frequent.
-
Did the PaperMod theme need updating to reflect the most recent changes in Hugo ?
-
Do other popular Hugo themes (Ananke) function without any issues ?
-
Assuming the local Hugo site works, did the push to GitHub work ? Check the recent updates to the GitHub repository.
-
Did Netlify then get triggered correctly by the GitHub updates?
-
Did the Hugo build process complete successfully on Netlify ? What version of Hugo is Netlify using ? Is this identical (or compatible) with the locally installed version of Hugo ?
After yet another issue following a Hugo upgrade, I got increasingly frustrated with this frictionless blogging process that was anything but. I was now spending more time fixing my static (sic), unchanged blog instead of writing any new posts.
Once again, I started to consider using an alternative static site generator. After all, I already had migrated my content to each of the popular SSG's I evaluated last year.
My mind was made up. I was going to do it. Just a question of selecting an SSG and actually doing it.
And then Dave Pearson came along and spoiled everything by creating BlogMore...