I Moved My Blog Off Blogger With an AI Pair Programmer

· 6 min read · Hugo, AI, Migration

In this post
  1. The goal
  2. Step 1: Get the posts out
  3. Step 2: The ~500 code snippets that weren’t code
  4. Step 3: A theme with no JavaScript (at first)
  5. Step 4: Sections, because “posts” is not a personality
  6. Step 5: DNS, certificates, and the 404 only browsers could see
  7. Step 6: Keeping the old visitor count
  8. What working with an AI pair programmer was actually like
  9. Was it worth it?

This blog has lived on Blogger since 2013. Forty-one posts, one “Hello World!”, a sidebar full of widgets, and a theme that was modern back when I was still writing about thread-safe code in C. My profile site was on Google Sites. Both worked. Neither felt like mine.

So I tried an experiment: move everything to a fast, simple, self-owned setup, pairing with an AI coding agent the whole way. I made the decisions; the AI did most of the typing. I steered a good chunk of it from my phone while the laptop did the work.

Here’s the stack trace of how it went.

The goal

  • Snappy. No ads, no trackers, no 2 MB of widget JavaScript.
  • Mine. Plain files in a Git repo, deployed for free.
  • Nothing breaks. Every old link like /2025/01/...html must keep working.
  • A few modern touches. Search, a reading-progress bar, “keep reading” suggestions, link preview cards, and a Ko-fi button for anyone who wants to buy me a coffee.

We landed on Hugo with a small custom theme, hosted on GitHub Pages, with DNS still at my registrar.

Step 1: Get the posts out

Blogger exposes a JSON feed, which made exporting easy. Converting was the interesting part. Every post went through an allowlist sanitizer: keep paragraphs, headings, links and code; drop scripts, iframes, inline styles and anything that looks like javascript:. Old internal links were rewritten to relative paths so they stay on the new site.

Each post keeps its original URL in front matter:

{
  "title": "Understanding Read Your Own Writes Consistency in Distributed Systems",
  "url": "/2025/01/understanding-read-your-own-writes.html",
  "categories": ["Learnings"]
}

A test checks that every one of those URLs is still built. Cheap insurance.

Step 2: The ~500 code snippets that weren’t code

This was my favourite segfault. Many of my older posts had been written in Markdown somewhere else and pasted into Blogger. Blogger quietly turned the code blocks into ordinary paragraphs. Indentation: gone. And every *pointer had been “helpfully” interpreted as italics.

On the old blog, you just squinted. On the new one, I wanted real code blocks.

The fix was a few heuristics:

  1. A paragraph that contains line breaks and starts like code (func , package , //, apiVersion:, x := ...) is probably code.
  2. Consecutive code-ish paragraphs belong to the same block, including that lonely } that ended up in a paragraph of its own.
  3. <em> inside code was originally a *, so put it back.
  4. Re-indent brace-based code by nesting depth.

The re-indent is simple, and that’s the point:

depth = 0
for line in lines:
    stripped = line.strip()
    closing = len(stripped) - len(stripped.lstrip("})]"))
    depth = max(0, depth - closing)
    out.append("    " * depth + stripped)
    code = strip_strings_and_comments(stripped)
    depth += code.count("{") + code.count("(") - code.count("}") - code.count(")") + closing

It recovered roughly 500 snippets. YAML was a lost cause (you can’t infer YAML indentation from braces), so the Kubernetes examples are code blocks now but still flat. Honest limitations are still limitations.

Step 3: A theme with no JavaScript (at first)

The first version shipped with zero JavaScript and a strict Content Security Policy. Everything that could be done at build time was:

  • Reading progress bar: pure CSS, using scroll-driven animations. Browsers that don’t support it just don’t show it.
  • “In this post” outlines: generated from headings at build time for long posts.
  • Related posts: Hugo’s related-content index, weighted by topic first, then section and date.
  • Link preview cards: generated per post at build time, so sharing a link shows the title and section instead of a blank box.

Later I added a little JavaScript where it genuinely helps: copy buttons on code blocks, static search (the index is built in CI, and searching happens entirely in the browser), and comments backed by GitHub Discussions. The CSP only allows scripts from this site and the comments widget, and a test fails the build if an inline script ever sneaks in.

Step 4: Sections, because “posts” is not a personality

Forty-one posts in one long list didn’t feel right, so the blog now has three sections:

  • Stack traces: thoughts, opinions and gotchas: what my mind dumps when it segfaults.
  • Learnings: concepts and guides I’ve worked through.
  • Experiments: things I built, broke and rebuilt. (Hello.)

Sorting old posts into buckets turned out to be a nice way to reread twelve years of my own writing. Some of it aged well. Some of it is… a stack trace.

Step 5: DNS, certificates, and the 404 only browsers could see

Cutting over DNS was done through the registrar’s API, with a rule that every change is a dry run first, shows the current and proposed records, and only applies after I say yes. It also prints the command to roll back. I liked that more than I expected to.

Then HTTPS got stuck. GitHub hadn’t issued a certificate because DNS caches still pointed some resolvers at Blogger. The standard nudge is to remove and re-add the custom domain. That worked: the certificate arrived.

And then the home page started returning “Site not found”, but only in browsers.

curl said 200. The browser said 404. Different networks, IPv4, IPv6: all 200 from the command line. The clue was in the headers:

curl -sI -H "Accept-Encoding: gzip, br" https://blog.ganapathy.xyz/ | grep -iE "^(HTTP|age)"
# HTTP/2 404
# age: 971

During the few seconds the domain was removed, the CDN had cached a 404 for the compressed variant of the home page. Browsers always ask for compressed responses; plain curl doesn’t. Redeploying the site purged the cache, and everything was fine.

Lesson: when you’re debugging “works for me”, make your test client look like the real client.

Step 6: Keeping the old visitor count

Blogger had counted about 40,000 visits over the years. I didn’t want the counter to restart at zero, so the footer now shows the new count (from a privacy-friendly counter with no cookies) plus the 40,000 from Blogger. If JavaScript is off, it just says “40,000+”. Small thing, but it felt right.

What working with an AI pair programmer was actually like

Some honest observations:

  • It’s fast at the boring parts. Importers, sanitizers, templates, CI workflows, tests. Hours of work became minutes of reviewing.
  • I still had to make every real decision. Which sections, what goes live, what my title is, what tone I want. My first bio draft read like a résumé. I asked for humble. Then quirky. That’s how this blog got its tagline.
  • Guardrails mattered. Dry runs before DNS changes, tests before deploys, “show me before you publish.” The AI asked before anything outward-facing, and I’d insist on that again.
  • It debugs like a good teammate. The browser-only 404 was found by forming a hypothesis, testing each CDN edge, and then comparing request headers. Not magic, just method.
  • Reviewing from my phone worked surprisingly well. Screenshots of the preview, a yes or a “try another line”, and the laptop kept going.

Was it worth it?

The new blog loads fast, has no ads, keeps every old link, and finally feels like mine. The whole thing lives in a Git repo I control, and future posts are just Markdown files.

No guarantees, but it compiled for me.

If this saved you a migration headache, there’s a coffee button below. And if you hit a bug on the new site, the comments are open. Consider it a bug report with extra steps.