Moving to Hugo


If you’ve been here before you might notice the site looks different. Indeed I moved my content to yet another platform (first it was blogspot -> hakyll).

I wanted to publish something but I ran into issues: my toolchain did not work. See, I’ve been doing less Haskell on my machine lately and negligence led into my setup rotting (as I did upgrade my machine quite a bit). Truth be told the infrastructure was not designed to last the test of time. Anyways after a few rounds of debugging I once decided to finally give up my complicated custom setup and move to something off-the-shelf so I can focus on writing.

Hakyll

This may come as a bit surprising but Hakyll is not actually a ready-made tool. Rather it’s a Haskell library to write your own static page generator. This means it’s super customizable but it also means you need to own your generator and give it some love. Which I did for a while. But when I stopped I ran into trouble.

But I wanted to keep my content. Preferably also the general architecture: keep posts in markdown and generate static html pages for publishing.

I’m and engineer by heart and I’m the first to admit I love playing with shiny new tools. So why not jump ship and move to something new? Maybe something easier to maintain.

Choosing new tools

With the hype around “JAM stack” and static page generation I imagined there is a proliferation of tooling focusing on my issue. A web search quickly led me to staticgen.com - a site dedicated to providing a list of tools. Perfect.

Few names sounded familiar. But reading descriptions I figured out I have a few more requirements. I don’t want do deal with frontend frameworks (React/Vue/etc) - I want my content in markdown. And I also want my tools fast, easy to install/maintain and fully featured - no hacking to set up RSS (yes I want to support RSS in 2020 :D).

A lot of research and playing around later I settled on Hugo. I ticks all my boxes, plus it’s written in Go which is probably my main language at the moment so I’m very familiar with the tooling and thus comfortable handling installs/maintenance.

So Hugo it is.

The migration

Since Hugo works by the same principle - content in markdown + templates - it was quite straightforward. Copied over my content, updated the slight differences in metadata with a quick vim macro, whip up a basic config based on the tutorial et voila: blog was rendering. Well I took an off the shelf template to begin with. Then some modification to get it quite right and I was very happy. No code to maintain, just content, template, and a config file.

Verdict

The part that’s actually impressive is the default features and speed make for really pleasant experience. Out of the box I had automatic rebuilds with file watching, nice error messages for when I make a mistake and even automatic browser refreshes. And the whole thing is so quick that by the time I save in my editor and switch to browser it already rebuilt, refreshed the page and rendered. Feels instant. I love it.

With technical hurdles removed maybe I’ll start writing more again.


Last modified on 2020-01-15

Previous Linear time sorting
Next Rename rebase with git