Skip to content
An orange neon sign reading AI on a dark grey textured circuit board

blog 5 min read

Moving from Ghost to Hugo with Claude

I moved this blog off a Ghost VPS to a static Hugo site in a day, with Claude Code doing most of the heavy lifting. Here's how it went.

This isn’t the first time I’ve moved my projects around (remember Heroku to Dokku?). This time, the blog itself moved: from Ghost running on a VPS to a static site built with Hugo.

The reason is simple. I was paying for a VPS that did exactly one thing: run Ghost. I don’t use members, paid subscriptions or newsletters, and comments were turned off. A blog that only serves pages doesn’t need a server. It can be plain HTML on a free host like Cloudflare Pages.

I did the whole migration in one day, working with Claude Code in my terminal. I made the decisions; Claude did the digging, the scripting, and the checking. Here’s how it went.

Picking the generator

The first question I asked was which static site generator could rebuild the site from my existing Ghost content. The answer was Hugo:

  • Jekyll’s Ghost importer was built for very old Ghost versions.
  • Eleventy and Astro can pull from Ghost, but only from a running Ghost server, which is the thing I wanted to get rid of.
  • Hugo is a single binary, builds in milliseconds, and has plenty of themes.

Getting the content out

Ghost ran inside Docker, managed by Coolify. Uploaded images live in a Docker volume mounted at /var/lib/ghost/content, so copying them out was one command on the VPS:

docker cp <ghost-container>:/var/lib/ghost/content ./ghost-content
tar czf ghost-content.tar.gz ghost-content
bash

For the posts, I exported a fresh JSON file from Ghost Admin. It had 54 published posts, 1 published page, 95 drafts and 43 tags.

Converting the posts

This is where it got interesting. Ghost stores post bodies in its own internal formats, and my export had two of them: 115 items in Ghost’s newer Lexical format and 35 in the older Mobiledoc format. It wasn’t clear that the existing converters handle the newer one.

Claude noticed that every published post also had its finished HTML saved in the export. So instead of fighting Ghost’s formats, it wrote a Python script (BeautifulSoup + markdownify) that converts that HTML to Markdown. Ghost’s special blocks needed custom handling:

Ghost blockIn Hugo
Link preview cardsA small bookmark shortcode that looks the same
Images with captionsHugo’s figure shortcode
CalloutsQuote blocks with the emoji
TogglesNative <details> elements
YouTube / Twitter embedsKept as raw HTML
CodeFenced code blocks with the language

Drafts came across too, marked draft: true. Hugo never publishes them, but they’re there when I want to finish one.

I didn’t want any old URL to 404. Ghost served posts at /{slug}/ and tags at /tag/{slug}/, and Hugo can do the same:

[permalinks.page]
  posts = "/:slug/"
[permalinks.term]
  tags = "/tag/:slug/"
toml

Images were copied to static/content/images/ at their original paths, so even old image URLs still work. A _redirects file covers the rest, like /rss/.

To check this, Claude pulled the sitemap from the live Ghost site and compared it against the new build. All 94 post, page and tag URLs exist in the Hugo site. The only remaining one, /author/madil/, is covered by a redirect.

Things it caught that I would have missed

This is the part that impressed me the most. Claude didn’t just convert things; it checked them.

  • Already-broken images. 10 image and video links in old posts pointed to files that weren’t in my backup. Claude checked them against the live site and found they were already returning 404, probably lost in an earlier server move. I had no idea. We removed them.
  • Vanished social links. My About Me page had icon-only links to Twitter, GitHub, LinkedIn and AngelList. With no text inside them, the converter silently dropped them. Claude spotted the empty line while fixing something else, traced it back, and confirmed no other page was affected.
  • A theme that didn’t build. The first theme I tried, PaperMod, had a last release that didn’t work with the current Hugo, so we used its latest code instead.

A theme that feels like home

Ghost had been running the Liebling theme, and I wanted to keep that look. So instead of a generic Hugo theme, I asked Claude to build one closer to Liebling using Tailwind CSS, with Alpine.js and htmx for the interactive bits.

The result is the theme you’re looking at. It uses Liebling’s typeface (Source Sans) and colours, the card grid, and the featured-post slider. Under the hood:

  • Tailwind CSS v4 is compiled by Hugo itself, with all colours as CSS variables so dark mode is just a class on the page.
  • Alpine.js handles dark mode, search (press /), the featured slider, the reading-progress circle and the copy buttons on code blocks.
  • htmx handles “Load more posts” and the tag filter on the home page. Both just fetch an existing page and swap in its post grid, so there’s no API to build or run:
<a href="/page/2/"
   hx-get="/page/2/" hx-select="#post-grid > article"
   hx-target="#post-grid" hx-swap="beforeend"
   hx-select-oob="#load-more">Load more posts</a>
html

The fonts, Alpine and htmx are all served from this site, so there are no third-party CDNs.

Claude tested all of it in a headless browser: it clicked through the slider, load-more, filters, search and dark mode, took screenshots in light and dark mode and at phone width, and fixed what looked off. That included underlined preview cards, stray backticks around inline code, and code blocks that made the page scroll sideways on mobile.

What it was like

What surprised me wasn’t the speed. It was that I stayed in charge of every decision that mattered. Which content to keep, what to do with the drafts and the broken images, what the site should look like: Claude asked, explained the trade-offs, and then did the tedious part. When something went wrong, it said so plainly instead of papering over it.

The whole site now builds in under a second, and the VPS can go. If you’re running a personal Ghost blog on a server you don’t otherwise need, the move is very doable.