Migrating to Hugo
This weekend I migrated my blog to Hugo.
My website is now based on the Hugo Bear Blog
theme, generated with
Hugo, hosted by GitHub Pages
and served with Cloudflare. I’ve also migrated
eigenfoo.xyz domain to the more creditable-sounding
georgeho.net were already taken). In terms of
typography, the header typeface is Nicholson
Gothic, the body typeface
is Equity and the monospaced typeface for
occasional code snippets is Triplicate.
In all, I probably spend the equivalent of two fancy lattes a year for this
Why Hugo? Why Not Jekyll?
Honestly, no good reason! Some people point out that Jekyll is not actively maintained or used anymore, and that GitHub Pages doesn’t support Jekyll 4.0. However, those aren’t really good enough reasons for migrating a blogging stack.
Here’s a short list of things I like about Hugo over Jekyll — but again, none of these things really should have enticed me to make the jump.
- Ease of installation and use (Hugo is a binary executable instead of a Ruby library), and it was very easy to make changes to the theme (e.g. changing the font or increasing the font size) — although that could just be because the theme that I’m using is dead simple.
- Automatic generation of a sitemap and RSS feed — with Jekyll, these needed to be done manually (or by your theme).
- Typographical conveniences like automatic smart
---into the appropriate hyphen or dash, and
...into an ellipsis.
- Faster builds of my website… although this isn’t really that helpful for me, since my blog barely has a few dozen pages.
…was surprisingly painless! All I really needed to do was to pick out a
theme, follow the Hugo Quick
Start, dump my Markdown blog
posts into the
content/ directory and change some of the YAML front matter in
all of my blog posts.
In reality, I spent a few extra hours fiddling with the typography and making sure that all my links were back-compatible with my previous website.
This is actually not the first time I tried to rewrite my website: earlier this year I experimented with writing a Tufte-inspired blog using Pollen. For those unfamiliar, it’s like R Markdown (in that it’s a markup language that allows arbitrary R code to be embedded in it), but instead of R, it’s Racket, and instead of Markdown, it’s your own domain-specific markup language that you build with Racket.
This means that I wrote a custom language specifically for formatting Tufte-style two-column blog posts. It actually worked out pretty well (and the resulting blog posts looked damn good), but I couldn’t justify maintaining my own language specifically for writing blog posts. I’d probably recommend using Pollen for large, one-off pieces of writing (like a book), instead of small, recurring pieces of writing (like a blog).