Skip to main content
  1. Dispatches/

Migrating My Site to Hugo

·420 words·2 mins
Articles Go Ssg Personal Tech Assorted Geekery
Daniel Andrlik
Author
Daniel Andrlik lives in the suburbs of Philadelphia. By day he manages product teams. The rest of the time he is a podcast host and producer, writer of speculative fiction, a rabid reader, and a programmer.

I feel like “migrating to a different static site generator” is the new “installing a new Linux distro.” It’s something nerds do for almost no reason besides curiosity, boredom, and perhaps no small amount of masochism. And I am one of those nerds and just as guilty of the above as the rest.

So I’m pleased to introduce you to the new version of my site, now powered by Hugo , a SSG written in Go.

Why Hugo?>

Why Hugo? #

I’ve been running Pelican for about five years, and in general I’ve been pretty happy with it. But while significantly faster than my earlier experiences with Jekyll, with 18 years of content, production builds were taking much longer. Also, I knew I wanted to do some reorganization of the site, so now was a good a time as any to look at alternatives.

I initially looked at Zola because I knew it was fast, and given my interest in Rust it was appealing. It’s templating system was pretty similar to Jinga so I wouldn’t be learning syntax from scratch.

But ultimately, Hugo seemed more flexible1 and the ability to use _markup templates to override the default rendering sold me on it. Most of the SSGs support shortcodes to do this kind of thing too, but that litters your markdown with publisher-specific code.

Once I picked Hugo and spent a little time getting an understanding of how it worked, I went and selected a theme. I chose Blowfish because I liked the aesthetic, it supported both dark mode and light mode, and made use of Tailwind CSS, which is a framework I’ve already been playing with anyway.

The Process>

The Process #

Migrating between SSGs is never totally straightforward. They all operate with alternative assumptions, and implement content management differently. This was similar.

I spent about two days finagling files into a folder stucture that wouldn’t break permalinks, as well as writing lots of regular expressions to solve for frontmatter differences, and removing or converting markup away from Pelican’s shortcodes.2 And of course, the usual config tweaks trying to resolve surprises.

But now, it’s here!

What’s Next>

What’s Next #

Hopefully more blog posts. And there are a few more things I want to tweak here, but it feels good to finally launch it.

Plus, now my site builds in less than a second!


  1. At least for now. ↩︎

  2. Don’t use your SSG’s shortcodes, kids. You’ll pay for that little bit of convenience later when you try a different one out. ↩︎

Related

I Am In Fact Alive
·471 words·3 mins
Articles Announcements Assorted Geekery Linux Personal Tech
Wow, where the hell have I been?! It’s two days shy of a month since I last posted, which is an eternity online. As is probably obvious, I’ve been really busy with work and all the other interesting things that life can throw at you.
The Things We Do For Love
·781 words·4 mins
Articles Assorted Geekery Linux Personal Reviews Tech
I haven’t posted in a few days, in part because I’ve been pretty busy, and partly because I’ve been overhauling my system with a brand new Linux distribution. I’m now running Gentoo and I absolutely love it.
New year, new nerdery
·1217 words·6 mins
Articles Aws Assorted Geekery Personal Vps Linux Gentoo Funtoo
It’s the January of 2018, and the sickness is upon me again. Sometimes you can feel it coming, like that first head fog that warns of a coming cold, or the klaxon of a stomach churn that alerts you to an impending flu.