Dan Poltawski's blog

Back Online, Moved to Hugo

Offline since September 2023..

Lately, I’ve been sorting through my RSS feeds and tackling the mountain of unread items, aiming to make my feedreader a more relevant source of daily content.

To my embarrassment, while restructuring my feed subscriptions, I discovered that this blog had been offline since September 2023. Oops! Despite the absence of new posts for seven years… I value keeping past posts accessible and clearly overlooked the monitoring messages notifying me of the blog’s downtime1.

The outage happened because I was hosting the blog on a VPS generously lent to me. Unfortunately, the hosting service reached its end of life, prompting the search for a new home for my blog.

From Octopress to Hugo

Having previously moved this site to Octopress and stored its source in Git, I planned to publish it as it was. However, the usual struggles with Octopress and Ruby, especially managing the Ruby environment and dependencies, made me consider other options. I ran into issues with Ruby gems, causing enough frustration to explore a different solution.

Enter Hugo. Having grown fond of various Go tools over the years (especially for the simplicity of static binaries), Hugo had caught my eye. Discovering Octohug gave me the motivation to dive deeper into the migration process.

While Octohug didn’t handle the conversion perfectly, I submitted a pull request for one issue and manually addressed several other content-related problems.

Selecting a suitable theme proved to be the most time-consuming part of the transition. After evaluating numerous options, I settled on hugo-paper for its simplicity and cleanness.

I’ve only completed basic tasks with Hugo so far, but it seems to live up to its good reputation, offering significant flexibility. One complex consideration I’m pondering is submitting a pull request to Hugo Paper to optimize its static assets using resources.Fingerprint, allowing for more aggressive caching headers to be set on static resources.

With this transition, the blog now runs on Hugo, marking the fourth CMS iteration since its inception on Serendipity, followed by conversions to WordPress in 2011 and Octopress in 2013.

Hosted on Cloudflare pages

I was already using Cloudflare in caching mode for Octopress, so when I came across the documentation, deploying to Cloudflare Pages seemed like the obvious choice.

It functions exactly as described, and during testing from some of TNP’s POPs, I’m seeing approximately 1 ms time_connect reported by curl, indicating that the content is indeed being served from the edge. (I didn’t explore any other options extensively.)

Failed the RSS feed litmus test

Migrating between blog engines so often results in duplicate items in feed readers and I was hoping I could avoid this.

Alas, when I made the site live and got my feedreader to refresh, I failed like so many others before me. Frustrated and confused I interrogated the database of my feedreader to work out what I’d done wrong and it all became clear:

                            guid                            |       title
 https://blog.danpoltawski.co.uk/2017/08/leaving-moodle-hq/ | Leaving Moodle HQ
 https://blog.danpoltawski.co.uk/2017/08/leaving-moodle-hq  | Leaving Moodle HQ

Apologies for the duplicates if your feed reader has stuck with me!

More blogging

I’m aiming to carve out some time for blog posts. Reflecting on the historical entries, I find myself both cringing and wishing I had documented more of my side projects over the past few years. I’ve also got vague plans to delve into more professional blogging at the day job - shedding light on the technical aspects of the projects we’re undertaking at TNP. Watch this space..

  1. Initially, I thought I’d neglected to put this site into my basic uptime robot monitoring, but the ‘Up’ email I got from UR when I got the site back online suggested otherwise. ↩︎