When I first set up this blog, I reached for Sanity. It's a great CMS: a polished studio, a flexible query language, and an image pipeline that just works. But after living with it for a while, I realized I was paying for flexibility I never used.
This post walks through why I switched to Keystatic, how the migration went, and what I'd tell anyone weighing the same move.
The problem with "too much" CMS
My blog is a handful of long-form posts. There are no editors besides me, no localization, and no content shared across multiple sites. Yet every page load depended on a round trip to a hosted API.
That setup came with a few quiet costs:
- An external dependency for content that rarely changes.
- Environment variables and project IDs to keep in sync across machines.
- Content living outside the repo, so a post and the code that renders it could drift apart.
- A heavy studio bundle shipped as part of the app just to edit a few fields.
The best infrastructure for a personal site is the kind you forget exists.
Why Keystatic
Keystatic keeps content as plain files in the repository. Each post is a single Markdoc file with frontmatter, and the admin UI reads and writes those files directly. No database, no API keys, no separate dataset.
What I gained
- Posts are versioned with git, right next to the code that renders them.
- Every pull request can include both a content change and a layout change.
- Local development works offline, with zero setup.
- The schema is plain TypeScript, so the editor and the reader share the same types.
What I kept
The public site looks exactly the same. The blog index still supports search, tag filters, date ranges, sorting, and pagination. The post page still renders headings, quotes, and lists with the same typography. Only the data layer changed.
How the migration went
The whole swap came down to a few steps:
- Recreate the post schema in
keystatic.config.tswith the same fields: title, slug, description, publish date, reading time, tags, featured flag, and cover image. - Export the existing posts and their cover images into
content/postsandpublic/images/blog. - Replace the GROQ queries with the Keystatic reader, mapping each entry to the same
BlogPostshape the UI already expected. - Swap the Portable Text renderer for Markdoc, mapping paragraphs, headings, quotes, and lists to the existing styled components.
- Remove the Sanity packages, studio route, and environment variables.
Because the UI only ever consumed a plain BlogPost object, none of the page components had to change. That was the real win: a clean boundary between where content lives and how it's displayed.
Would I recommend it?
If you're a solo developer with a portfolio or a small blog, yes. File-based content is simpler, faster to work with, and one less service to babysit.
If you have a team of non-technical editors, scheduled publishing, or content feeding several apps, a hosted CMS like Sanity still earns its keep. The right tool depends on who's writing and how often.
For me, the answer was obvious once I asked a simple question: who is this CMS actually for? It was just me, and I already live in the repo.