Moving to Hugo
- 3 minutes read - 435 wordsSo I have been blogging off and on for the last decade or more and have tried my fair share of site building tools. Until recently I had been using Jekyll but had started to get frustrated with it as a tool. Anyone who looks at my post history can see the large gaps between posts and this meant each time I wanted to post something new I had to get Jekyll working again. Not being familiar with Ruby and not yet having containerized my build suite made this a huge pain. I also had several presentations I wanted to better incorporate into my main site that had previously been tacked on with some ugly Git submodule nonsense. I couldn’t get them to render with Jekyll the way I wanted so they lived as totally separate pages in another repository. Now that I have a little free time I decided to fix all that by changing to yet another static site generator. Enter Hugo!
Overall the transition has gone well, the main focus being the reformatting of front matter and making sure that old links don’t break. I also switched from Lunr.js to pagefind to handle my site search which has been smooth as well. PageSearch even comes with some pre-styled interface elements which is an unexpected treat.
Everything hasn’t been sunshine and puppies however. The Ananke theme
is in the middle of a messy transition to the newest template structure which
makes it difficult to modify or even use. This wouldn’t be a problem except
for the fact that it is the template that the Hugo documentation recommends
you start with! Now I know that Hugo is 0.x.x software and as such one should
expect lots of API changes but the project is 12 years old…you’d think they’d
be using that first major version number by now to indicate major API changes.
Anyway, I finally got it working and fixed the mistake I made with Jekyll in
not containerizing my build environment. Now I know each time I go to write I
will have exactly the same working environment to use. I also went ahead and
created a little webhook triggered pipeline in Argo Workflows which will auto
build and publish my site when I commit to the main branch in its repository.
More an experiment to learn Argo Workflows but useful none the less.
Future tasks include developing a lightbox partial to handle image gallaries and converting my personal site over to Hugo from Jekyll as well. But given that just doing my professional site took months…that’s probably a problem for another day!