How I Moved My Site From Squarespace to Astro in One All-Nighter
TL;DR
- In one all-nighter, I moved ten years of my work off Squarespace onto a site I own (Astro on Cloudflare). It was live in 3½ hours.
- Claude wrote lots of the code. Spec-driven design is what made it work: the rules, the checks and the questions were mine.
- Nothing broke. All 322 old links still work, and 126 messy tags became 8 clear topics.

See any difference? That’s the point: same look, but now I can update or modify all the infra underneath it. And that’s a relief.
Trigger warning.
When was the last time you actually pulled an all-nighter? Well, for me, it was this past weekend.
I’m of two minds when it comes to admitting it, but I stayed up all night coding. I actually did. I migrated my site off Squarespace to Cloudflare. It’s a crazy thing, really, but Claude Code made it possible. So there I said it. Yes, I stayed up all night coding.
I wasn’t just throwing paint at the wall, though. I wrote the spec doc and the AGENTS.md file, and made sure every URL in my sitemap still works or redirects. It had been on my to-do list for quite some time, and it was something I just don’t usually have the time for during a normal week.
And what a week to do it. Squarespace laid off about 19% of its workforce. Anthropic is about to go public. And on the very night I started, one router took down air traffic across the whole country. A good reminder that infrastructure is fragile, right as I was about to move mine. Lots of change afoot.
On second thought, maybe I will go to sleep. Wake me when it’s over. Okay, okay, you’ve convinced me. I’ll stay awake. I don’t want to miss the action. There are too many good things to be inspired by.
How I made this sleepy Victorian
No image generator. I asked Claude for “a Victorian sleepy guy holding a candle,” and it drew him as code: about 90 lines of SVG, the same format as icons and logos. He’s built from circles and curves, colored with this site’s own pink.
The motion is plain CSS inside the file, no JavaScript: the flame flickers, the glow pulses, his head nods off every five seconds, and the Zzz’s drift up. If you’ve turned off motion on your device, he holds still.
@keyframes flicker {
35% { transform: scale(0.94, 1.08) skewX(3deg); }
70% { transform: scale(1.04, 0.95) skewX(-3deg); }
}Then we polished him the same way as the site: look, ask, adjust. Lighter sideburns, rosy cheeks, a ruffled collar, slippers.
Casey Newton moved his site off Squarespace this year, too. But his was one page. Mine was ten years of posts, videos and case studies. Let’s get into it!
11:15pm: “What would it take?”

I opened Claude Code and asked: “What would be the specs to turn this Squarespace site into a self-managed site?” Then, right away: “Well, check it against the sitemap.”
That check came back as a mess. My backups didn’t match my sitemap. Safari refused to open them (turns out the backup tool had quarantined its own downloads). And the YouTube embeds were throwing errors. Not exactly a clean slate.
Midnight: the spec comes first

Before any code, I set the constraints. “Can the repo be private?” “Is it free? Does it require a CDN?” Those answers picked the stack: Astro for the site, Pages CMS so I can edit in a browser, Cloudflare for hosting, all in a private GitHub repo. No database to babysit.
Then I set the bar: “Make sure it’s all DRY, and use best practices.” And the limit: “I don’t want this to be that drawn out of a process. Just a workable design system.”
All of it went into the spec and an AGENTS.md file: house rules Claude reads at the start of every session. Five of mine, in plain English:
- Content needs no code. Adding, editing, hiding or deleting a post never means touching code.
- Never break a link. If an address changes, it gets a redirect.
- “Done” means every check passed. And failures get reported honestly.
- Ask before touching Cloudflare or DNS. And never log in to my account.
- Explain things in plain language.
Those five lines kept the night on track better than any single prompt.
What’s an AGENTS.md file?
A README written for AI coding agents instead of people. Because Claude reads it at the start of every session, the rules (what “done” means, what never to touch, how I like things explained) carry over even when the conversation resets. Mine is 26 lines.
What’s in the spec?
The migration spec is the plan of record: every decision gets written there before it’s built. Its sections:
- Goal
- Source material (what the Squarespace backup actually contains, checked against the sitemap)
- Target architecture, engineering principles (DRY, content changes without code) and content architecture
- URLs and SEO
- Migration steps, with pass/fail checks
- Domain cutover
- Open decisions
- Effort and cost
- Known issues
- Notes for the next migration (megashift.co)
At 12:41am I asked the question I’d keep asking all weekend: “Is this a maintainable site and system?”
1am: the first wall

Pages CMS wouldn’t load my site. At all, and the docs didn’t explain why. Claude dug into Pages CMS’s source code and found one line of my config in the wrong shape: “it was mine, not Pages CMS’s.” Fixed in minutes.
The one-line bug
Pages CMS checks its config strictly, so one setting in the wrong shape made it reject the whole file:
# what I had (Pages CMS rejected everything)
settings:
content: true
# what it expects
settings:
content:
merge: true # keep fields the editor doesn't showThen the same validator became one of the site’s automatic checks, so a broken config can’t be pushed again.
That’s when I stopped trusting “it looks right.” “Is there a check in place for all the required media?” “Check it via a Mermaid chart or something to ensure the flow makes sense.” “Is every page converted per the sitemap?” By 1:20am every page was converted and checked: 153 images, 0 errors.
At 1:38am, I hit my Claude usage limit. I upgraded. Of course I did. (Speaking of losing track of time with Claude: that one time I made a Claude Code status line timer that shows how long you’ve actually been at it. That night, I didn’t check it.)
2:45am: live

The plan said Cloudflare Pages, but Cloudflare’s setup screen sent me to their newer Workers setup instead. We added the one settings file it needed, ran a practice upload of all 1,294 files, and a few minutes later the new site was live on a test address. My first question: “So in the future, is it easy to update?”
The whole hosting setup, in one file
No server code at all, just “serve the built site.” Cloudflare runs the build and deploys on every push to the repo through Workers Builds.
// wrangler.jsonc
{
"name": "rkportfolio",
"workers_dev": false, // the site only exists at robkleiman.net
"compatibility_date": "2026-10-01",
"assets": {
"directory": "./dist", // the built Astro site
"not_found_handling": "404-page",
},
}There was plenty of experimentation, troubleshooting, and figuring things out along the way. And it turned into more than a move: a facelift, some hygiene, and a new information architecture (taxonomy, categories and tags). By sunrise I had a career timeline, 18 draft case studies written from my STAR stories (like turning an orphaned talk show into a change engine), and my writing reorganized around the business problems I solve instead of the companies I worked for.
A note on the taxonomy
That last part mattered more than it sounds. Over ten years on Squarespace, my posts had collected 126 categories and tags, many used once: Beer, Dubai, IKEA, HoloLens.
Nobody browses a portfolio that way.
As I put it that night: “Breaking it out by company might be weird to a reader. It’s more so oriented around the business challenges being solved.”
So I rebuilt it in three layers:
| Layer | Who sees it | Examples |
|---|---|---|
| 8 pillars | Readers | Developer Adoption, Building Communities, Teaching & Enablement, Things I’ve Built |
| 3 formats | Readers | Field Notes, Event Takeaways, Case Studies |
| 7 companies | Just me, behind the scenes | Google, Amazon, Adobe, Capital One |
Every post gets at least one pillar, and the site won’t build if one is missing. Companies still power each job page, but readers browse by the problem I solved, not just a rehashing of my résumé. My 99 posts from 2015–16 now live in an Early Writing archive. And every one of those 126 old category pages redirects to its new home, so no old link breaks.
Saturday morning: “Where’s my post?”
After a few hours off, I published some posts in Pages CMS and hit the most confusing moment of the weekend. My Amazon posts showed on my laptop but not on the live site. Then a post showed on the live site but not on my laptop. Nothing was broken: drafts show on my laptop and never go live, and my laptop just hadn’t pulled the edits I’d made in the browser.
But it made me ask: “Should I be synced better?” And then: “Is it needlessly complicated? What are the other publishing workflows?” We cut the extra preview sites, wrote down one simple way to publish, and it’s been boring ever since. Boring is the goal.
The next evening: the scary part

Search that knows the structure
The new taxonomy paid off again on Saturday evening, just before the domain switch, when I asked: “Based on the architecture, what’s a good way to add a search box to the site?” The answer was Pagefind: after every build, it indexes the finished site (247 pages) into small static files. No server, no search service, no monthly bill, and the search script loads only on the search page.
Because every post now carries a pillar and a format, search gets two filters for free: Topic (the 8 pillars) and Type (Field Notes, Event Takeaways, Case Studies, articles, pages and events). The cleanup made the content easier to find, not just tidier.
Then, the domain
Code is easy to undo. Pointing your real domain at a new site feels a lot less easy.
So before touching anything, all 322 addresses from my old Squarespace sitemap got tested against the new site. Every one either loads or redirects to the right page, so nothing breaks and Google keeps a decade of rankings (in Google’s terms, a site move without URL changes, the easy kind). Then I exported my DNS records as an undo button, deleted the old Squarespace records, and connected robkleiman.net as a custom domain. It was live a few minutes later, with an SSL certificate Cloudflare set up on its own. Last step: submitting the new sitemap in Google Search Console.
Registrar vs. DNS, in one minute
My domain was registered with Squarespace, but its DNS was already running through Cloudflare. They’re two different jobs: the registrar is who you pay for the name, and DNS is where the name points. So the whole switch happened inside Cloudflare, with no domain transfer. Two more checks before touching anything: there was no email on the domain (so nothing could break my inbox), and I kept the Squarespace site running as a fallback for two weeks.
Big shout-out to Cloudflare here. The free tier covers everything my site needs, the error messages tell you exactly what to do next, and the docs are clear at every step. I’ve spent years in DevRel, so I notice good docs. These are good docs.
What changed? I can edit any page from a browser, every change gets checked before it goes live, and once I cancel the Squarespace plan, hosting costs me nothing (just the domain).
What I learned
The migration by the numbers
- 3½ hrs from first question to live site
- 1,294 files deployed
- 322 old URLs tested · 0 broken
- 126 → 8 old categories & tags → pillars
- 153 images checked · 0 errors
- 1 usage-limit upgrade at 1:38am
Friday night, Nov 13, on a clock
- 11:15pm “What would it take?” The backups don’t match the sitemap.
- Midnight Constraints first: private, free, no database. The spec and AGENTS.md.
- 12:58am Pages CMS won’t load. Claude reads its source: “it was mine.”
- 1:20am Every page converted and checked: 153 images, 0 errors.
- 1:38am Hit the usage limit. Upgraded. Of course.
- 2:45am Live on a test address: 1,294 files.
- Sunrise Timeline, case studies, new taxonomy.
Yes, Claude wrote lots of the code. But that’s why spec-driven design is important: the real work was the questions I kept asking. Is it private and free? Does it match the sitemap? Is this needlessly complicated? Is it maintainable? Will every old link still work? The spec turned out to be the system design.
Things I said to steer Claude (my exact words, typos fixed)
Keep it simple
- “Is browser automation or headless useful? I don’t want this to be that drawn out of a process, just a workable design system.”
- “Is it needlessly complicated? What are the other publishing workflows?” Then: “Which is simpler?”
Set the quality bar
- “Make sure it’s all DRY and CRUD. Use best practices.”
- “Is this a maintainable site and system?”
- “Make sure it’s DRY, easy to maintain and manageable. For example, will I be able to remove or edit the ‘Behind the scenes’?”
Verify, don’t assume
- “Well, check it against the sitemap.”
- “Check it via a Mermaid chart or something to ensure the flow makes sense. This again is to take the locally copied version of the Squarespace site and put it in the aligned format with no errors.”
- “Is there a check in place for all the required media?”
- “Will that break anything?”
Design for the reader
- “Breaking it out by company might be weird to a reader. It’s more so oriented around the business challenges being solved, from the perspective of the person browsing.”
- “That would not replace the by-company on the back end, as that’s helpful, but this is more outward facing, so it’s dual-pronged.”
- “It’s like a permalink versus organization. Is this maintainable?”
- Naming a new section: “Play devil’s advocate.” Then: “Use each in a sentence to see which has better tone, and if it were in a LinkedIn post.”
Think about next time
- “And for future-proofing it.”
- “Do I need a README or updated specs or agents files for clear setup next time?”
- “What from this long exercise can be applied to the megashift.co migration?”
And when Claude got something wrong, it said so: “I need to correct what I told you.” Trust, but verify.
Was all that back-and-forth just babysitting an AI? I don’t think so. It was the design work: deciding what to keep, what to simplify and what “done” means. And because it’s all written down, my next migration will need a lot less of it.
This wasn’t new territory for me, just a new seat. At Amazon, I helped engineers adopt AI coding tools, and the lesson was always the same: installed isn’t adopted. Trust comes from guardrails and verification, not hype, and it breaks fast when an agent gets things wrong.
This weekend I got to be the engineer. Same lessons, from the other side of the keyboard.
It’s exciting to see what’s possible with these tools, especially when they make it easier to turn an idea into something real. In 2014, when I was building Creators’ Clubhouse, all I knew was a little HTML and how to open Chrome DevTools. This weekend I moved a decade of my work onto a system I designed and actually understand.
And the best part: my next migration, megashift.co, will be a much smaller job. The second run is easier than the first.
I invite you to check out some of my other work and the site overall. A few places to start: a swipe-left, swipe-right contact reviewer made from a Google Sheet, the paid directory I shipped to learn what vibe coding can’t teach you, and the bigger stuff: community programs at Google and DevCon at Amazon.
I’m currently open to roles in AI enablement and developer marketing, so let me know if you know anyone who’s looking to hire a builder who thinks like a marketer: a marketer who really, really likes to build things. That’s me.