Migrating to Hugo

This isn’t the first blog post you’ll see about static site generators on the web. I was a huge fan of Jekyll, but after migrating away from GitHub Pages, I found no advantages other than it being a database-less writing platform.

I still recommend Jekyll to people with less experience writing online, since it requires a gentler learning curve. However, I’ve noticed people recommending JavaScript frameworks like Webpack when they hear Static Site Generator. SSGs aren’t the same as bundlers—this website needs redirect pages, sitemaps, generated robots.txt files, and RSS feeds. While generating each of these with bundlers is possible, I’ll state again: use the tool built for your intended purpose.

I chose Hugo because Debian includes a package in the Buster distribution. I don’t care which version they’re distributing since I can easily switch the Debian image to Bullseye or Sid to generate content. I do this by taking advantage of Vagrant on KVM.

So far, I’m happy with Hugo 0.54.0. I created my own default theme because I wanted full control over it. I could have gone to GitHub and used a theme as a submodule, but this approach works better for me.

I had a previous attempt to migrate to Hugo, but the content wasn’t ready. Actually, the content still isn’t ready, so I’m just pushing a few posts at a time.

Currently, I’m using GitHub Actions to publish content to Netlify. Since I host several WordPress sites, I have a reseller account where I can create a database-free package for this website. Yes, I’ll use FTP upload the content. The only reason I keep everything on GitHub is for seamless Git LFS support.

As I mentioned, I’m migrating posts one by one. I’ve found mistakes in my writing and I’m updating the lastmod field instead of creating brand new content, which you can see on each post page.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *