Migrated to Hugo Static Site generator

I haven't written anything in my blog for a little while. I don't really feel bad about it, but one of the things that I feel prevented me from writing new things here was that I had some troubles with my previous static site generator Jekyll. Last week I switched this site over to use Hugo.

What I like more about Hugo

One of the biggest issues I had with Jekyll was how difficult it was to setup on a new machine. I am not a Ruby developer (although I know enough Python and have seen enough Smalltalk to fake it) and so setting up a Ruby interpreter with rvm and getting Bundler setup was quite difficult when all I wanted to do was write prose. Hugo on the other hand has a single executable. This means that even though Hugo is written in Go I don't have to have Go setup on the machine I want to write on. Instead I can just install an executable from my package manager.

One other thing that I like about Hugo is that it supports .toml front-matter on posts. Not really the biggest of deals, but I am not wild about .yml so this is a nice way to stick with something more familiar.

Finally one of the nicest things about Hugo is the automatic reloading when in development mode. This feature injects a script that will reload the page is anything in the file system that it's watching changes. This is really nice while authoring since it allows you to not have to switch out of your editor to see rendered changes.

What was the process

To perform the switch I used the hugo import jekyll tool. This tool did a great deal of the work as it copied over most of the posts and setup a new Hugo site.

After that I removed a number of blog posts that I had written a while ago and didn't feel so bad about having them fall off the internet (they are archived; I checked).

Then I went from blog post to blog post and for each:

  1. Switched the front-matter from YAML to TOML.
  2. Set up aliases so that old urls to live posts will still work.
  3. Added some tags and categories.

Finally I made sure that pages looked ok and that static files like the RSS feed, the humans.txt and the robots.txt loaded.

Finally I went ahead and made the switch by merging merged the branch.


Thanks Jekyll and the people who support it for helping me build my site for so long. Thank you Hugo contributors for building a tool so nice that it made it feel like it was worth finally switching.