Skip to main content

Moving this blog to Hugo

·5 mins

I’ve been blogging on and off on the internet for about 10 years on different platforms, one of them being my outdoor blog where I document stuff about my outdoor outings (mostly to jot down things I want to remember). I’ve used wix.com, then migrated it to wordpress.org, tried self-hosting but that never happened.

Last month, my wordpress.org subscription expired and I wanted to reflect whether this was something I wanted to continue paying for. And decided against it for various reasons.

  • I don’t want to pay for it
  • It’s slow
  • UI is clunky and hard to customise
  • Lack of portability
  • Lack of AI ingest-ability (not that I want to necessarily do that)

So I wanted something where it was

  • Simple, fast
  • Markdown (portability, timelessness)
  • Customisable
  • Version control
  • Free

Hugo and Congo #

I’d heard of static site generators before but never used one. The main options were Hugo, Jekyll, and Eleventy. I went with Hugo mostly because it’s fast, has a large ecosystem of themes, and the documentation is decent. No real strong reason over the others — it just seemed like the one with the most momentum for the type of site I wanted.

For the theme, I found Congo which is clean, well-documented, and actively maintained. Out of the box it was already close to what I wanted. I spent some time customising it with my own CSS — a sage green palette (#e4e7e0 background, dark text, Inter font) — and at some point it finally felt like it was actually mine, which WordPress never really did.

Getting the content out #

WordPress lets you export everything as an XML file, which sounds straightforward until you open it. The actual post content is buried in there but comes out loaded with WordPress-specific metadata, mangled image paths (encoded URLs), old category names that made no sense anymore, and various other cruft.

I wrote a Python script (cleanup_posts.py) to batch-process all ~97 posts. It:

  • Stripped WordPress metadata fields from the frontmatter
  • Decoded and normalised image paths
  • Remapped old category names to new ones
  • Converted the frontmatter schema to the clean format I wanted

Running it on all posts at once meant I could start fresh rather than spending weeks manually editing each file. The bulk clean wasn’t perfect — it got maybe 90% of the way there — but it meant the remaining manual work was much more manageable.

Redesigning how things are organised #

In WordPress I had a mess of categories accumulated over 10 years. Some were activity types, some were destinations, some were vague and overlapping. I wanted to start clean.

I settled on two taxonomies: activities and countries. That’s it. Activities covers what I was doing (climbing, hiking, cycling, skiing, etc.) and countries covers where. For an outdoor travel blog, these two axes cover almost everything I actually want to filter by.

I also added a layer of grouping — activities are grouped into Sports and Reflections, and countries are grouped by region (Europe, Asia, Middle East). This made the taxonomy pages more usable than a flat alphabetical list.

The editorial pass #

After the bulk clean, every post was technically valid but not actually good. Images were missing alt text, some posts still had dead WordPress links, a lot had dated openers (“Last weekend I…”) that would read strangely years later, and the spelling and formatting was inconsistent.

I did a post-by-post editorial pass in eight batches. What I was fixing each time:

  • Adding descriptive alt text to images (not just filenames)
  • Removing or replacing broken WordPress links
  • Rewriting dated openers to be timeless
  • Fixing spelling and typos
  • Adding or correcting cover images
  • Assigning the right activities and countries values

Going through old posts one by one is a strange experience. Some I barely remembered writing. A few I was happy with. Quite a few were rougher than I’d remembered. It was a useful exercise in that it forced me to actually read everything I’d published over the years, even if most of it was just trip notes for my own reference.

Building the logbook #

Partway through the migration I realised I wanted a way to see all my mountaineering and climbing activity in one place — something like an IFMGA-style logbook. Not just links to posts, but a structured list with route, grade, date, partners, and notes.

I designed a log: frontmatter block that can be added to any eligible post:

log:
  activity: mountaineering
  date: "2019-07-14"
  route: "Aiguille du Midi North Face"
  grade: "AD"
  partners: [name1, name2]
  notes: "Short note"

The logbook page pulls all these entries and renders them in a table. I also backfilled historical entries that predate the blog as stub files — no body content, just the log: frontmatter — so the logbook has a complete record going back further than the posts do.

It took more work than I expected to build the layout and get the data flowing correctly, but it’s one of the things I’m most pleased with about the new site.

Getting it live #

For the theme, I ended up using Hugo modules instead of keeping Congo as a git submodule. This makes upgrades cleaner and means the theme isn’t tracked in my own repo.

Deployment is via GitHub Actions — the workflow builds the site and pushes it to GitHub Pages. Getting the workflow right took a couple of iterations. The first version had an invalid hugo mod download step that broke the build; once that was removed it worked.

Where it stands now #

The infrastructure is done. The content is mostly clean. The editorial pass is still ongoing — there are posts I haven’t fully reviewed yet — but the bulk of the hard work is behind me.

Things I’d do differently: start with a cleaner taxonomy from the beginning rather than inheriting the WordPress category mess. The remapping worked but it required a lot of manual decision-making post-hoc that would have been easier to get right upfront.

Things I’m happy with: the logbook, the aesthetic, having everything in git, Markdown that I can actually read and edit in any text editor. The site is fast, it costs nothing to run, and it feels like mine.