the usual
inconsistent at best
Moving From Ghost to Hugo
Migrating my blog from Ghost to Hugo was a mild pleasure

Sometime in 2017 I got blogger’s block. It had nothing to do with content and everything to do with the platform: I’d been running my own Ghost instance for a few years when the good folks at Ghost made a 2.0 release and I couldn’t upgrade easily. It wasn’t their fault—I was getting fancy with my deployment (my Ghost deployment was one of my early “live” Docker deployments in 2015 and I didn’t understand container patterns yet) which made it brittle to change.

I tried the official upgrade path several times, but my theme was a bit behind the times and I couldn’t find a new one that I liked. I tinkered and was able to get it to 2.0, but only on my development machine and I didn’t want to risk blowing it up. I’ve let it languish since then.

Last week I came across Hugo and thought I’d give it a try (For Mac OS: brew install hugo). I then found a Ghost to Hugo converter which worked flawlessly. It took my Ghost backup file and created a Markdown file for each entry, along with the associated metadata (title, publish date, etc.) which Hugo calls “front matter”.

I then wrote a collection of small Perl scripts to make various Ghost plugin conversions (converting HTML <gallery> sections into a Hugo-compatible gallery, converting single Markdown pages into Page Bundles, migrating associated page images into the Page Bundle they belong to, etc.).

I did a Docker bind volume mount of the Hugo generated content into a stock Nginx container for serving the assets. I’m using Traefik for my reverse proxy and TLS termination, and I’m doing monitoring with Fluentd and Prometheus. Spray a little Make and rsync on it and it’s good to go.

Last modified on 2020-08-02