With bugs!

Converting from Jekyll to Hugo

I recently became motivated to start blogging again, and needed to make some updates to my blog design before making new posts.1 I discovered that Jekyll (the static site generator I previously used) has barely been updated in the years since I last posted. Minima, the theme I use (and the default theme for Jekyll), has been updated, but made no releases. With Jekyll essentially a dead product, I decided to follow in Julia Evan’s footsteps again and convert to Hugo.

The process of converting

Converting was actually pretty simple. Initial conversion was trivial. My blog is small enough that rather than use the importer, I just created a new skeleton and copied the content over. Then came the process of creating the theme (covered in just a bit). Lastly came the process of going through all of the content and ensuring that it reads the same. There are a few differences between the Markdown parsers that required some changes, but overall, very little needed to be done. I also managed to make a few improvements that should make editing easier in the future, such as taking advantage of Hugo’s lists and sections behavior to create proper support for series.

Creating a theme from scratch

While I like the Minima theme in general, there’ve always been a few things about it I would have liked to change. As written, however, it was a bit complicated for me and my limited CSS and web design skills. With more modern CSS capabilities, such as flexbox, grids, and nesting, I was able to make a site that I liked very simply and quickly. Not only that, but I managed to make it responsive to both size (it should work well on desktop and mobile) and color preference (light and dark).

I’m still tweaking things a little, but so far I’m pleased with the results.

Issues along the way

While the migration was pretty easy, there were some sticking points that were non-trivial:

Results

My site does generate much faster now, and live reloading when editing is practically instantaneous. Additionally, the theme and templates I’ve managed to set up make writing and editing posts much easier and faster.

I also like that I basically understand everything that goes into how my blog looks and generates content now, since I wrote the theme myself. This also makes me more confident in my ability to support it going forward, especially as upgrading Hugo versions is just upgrading a binary.

Lastly, because everything is all in one binary instead of several Ruby gems and a runtime, I don’t have to worry about site breakages or updates causing chain reactions of going down the rabbit hole.

Future improvements

Accessibility

I’ve done the best I can with my limited knowledge to provide basic accessibility support. I have done some research into tools to help me continue to improve the level of accessibility.

Syntax Highlighting

If you’ve read the Journal, you know that I was planning to improve the syntax highlighting for Jekyll. I do think that the syntax highlighting in Jekyll was actually superior to that in Hugo, so I still intend to replace it. Unfortunately, since Hugo is not modular, this may be more difficult.

Comments

I had the idea to use ActivityPub threads2 to provide a comment system for the blog. I’m not the first to have this idea, so there’s many examples I can reference, and I have a good idea of how to proceed. Comments should be coming soon.

Issues

If you run into any issues with the blog, please don’t hesitate to let me know. I’ve tested it as well as I can, but I’m certain I’ve missed stuff.3 Any issues with function, accessibility, or broken links are especially high on my list of things to track down and fix. The best way to let me know is to contact me on Mastodon.


  1. Specifically, I needed to change the link to Twitter into a link to Mastodon, now that I’m done with Twitter. ↩︎

  2. In reality, this will be Mastodon threads, but I think that any ActivityPub implementation should be able to participate as well ↩︎

  3. Because, as the title of the blog references, I write shitty software. With bugs! ↩︎

Tags