The harness

  • MCP server
  • The rules
  • Git delivery
  • Editorial calendar
  • All features

What it knows

  • Measured topics
  • SERP brief
  • Evidence bank
  • Cannibalization stop
  • Internal links

Free tools

  • AI crawler checker
  • Sitemap checker
  • Readability checker
  • AI slop checker
  • Meta description checker
  • FAQ schema generator
  • All tools

Learn

  • Claude SEO
  • All courses
ServicesAgentsPricingBlog

EN/ES

Log inCreate account
Create account

Your agent writes. The rules decide. You approve.

EN/ES

Product

  • Features
  • MCP server
  • Editorial calendar
  • SERP brief
  • Evidence bank
  • Git delivery

Agents

  • Slack (eve)
  • Claude
  • ChatGPT
  • Cursor
  • Grok Bot
  • Codex & VS Code
  • Setup guides

Free tools

  • AI crawler checker
  • Sitemap checker
  • Readability checker
  • AI slop checker
  • Meta description checker
  • FAQ schema generator
  • All tools

Compare

  • Outrank
  • Surfer SEO
  • Jasper
  • Frase
  • Writesonic
  • Copy.ai
  • All alternatives

Company

  • Blog
  • Pricing
  • Services
  • Case studies
  • AI info
  • Write skill
  • llms.txt
  • Log in
  • Create account

Learn

Claude SEOAll courses
Featured onFeatured on CodeHypeVerified on directreeFeatured on SaaSearch

Privacy·Terms·Support·© seodraft

November 20, 2026· Written by Chorch

Keystatic CMS: 7 lessons from running our blog on it

Learn what Keystatic CMS needs in production: GitHub mode on Vercel, one collection per language, image paths and a draft box for agent-written posts.

On this page

  1. 1. Keystatic edits the files already in your repo
  2. 2. Choose the storage mode before the first post
  3. 3. Run the deployed admin in GitHub mode on Vercel
  4. 4. Give each language its own collection
  5. 5. Put your SEO fields and a draft box in the schema
  6. 6. Store images under public/ so their URLs resolve
  7. 7. Let agent drafts arrive as files the admin can open
  8. Choose Keystatic when your posts can live in Git

In short

Keystatic CMS edits the Markdown and Markdoc files in your repo through an admin UI, with no database. To run it in production, use GitHub mode on Vercel and expose the repo variable to the client, give each language its own collection, store images under public/ and add a draft checkbox so delivered drafts stay hidden until you publish them.

The first time I deployed the Keystatic admin for this blog, every collection showed "Unable to load". The browser was running Keystatic in local mode and asking the server for /api/keystatic/tree, while the server, already in GitHub mode, answered with a 404.

Keystatic CMS is the editor behind seodraft's blog, which runs on Next.js and deploys on Vercel. I picked it for the simplicity of working git-based: every post is a file in the repository, and seodraft delivers approved drafts straight into that folder.

On October 13, 2026, the first eight Google results for "keystatic cms" were two pages of Keystatic's docs, its Cloud login, a comparison with Decap CMS, a GitHub discussions page and three write-ups, one of them an Astro guide. This post adds the production side, with the seven decisions that got the setup working and the config behind each one.

Lesson 4 covers a bilingual blog, where English and Spanish posts need separate collections so each language keeps its own slug. Start with what Keystatic stores and where.

  • 1. Keystatic edits the files already in your repo
  • 2. Choose the storage mode before the first post
  • 3. Run the deployed admin in GitHub mode on Vercel
  • 4. Give each language its own collection
  • 5. Put your SEO fields and a draft box in the schema
  • 6. Store images under public/ so their URLs resolve
  • 7. Let agent drafts arrive as files the admin can open
  • Choose Keystatic when your posts can live in Git

1. Keystatic edits the files already in your repo

Keystatic is a content editor that reads and writes the Markdown, Markdoc, JSON or YAML files in your codebase, and it needs no database.

You describe each content type in keystatic.config.ts, and the admin UI at /keystatic turns that schema into forms. Its docs ship integration guides for Next.js, Astro and Remix.

On this blog a post is a .mdoc file under content/blog/en/ or content/blog/es/, edited with @keystatic/core 0.6 on Next.js 16. Saving in the admin writes that file, and in GitHub mode the save becomes a commit you can review or revert.

2. Choose the storage mode before the first post

Keystatic has three storage modes, and the one you pick decides who can edit and where each save goes.

local writes to your own disk, which suits development and a first prototype. github reads and writes a GitHub repository through a GitHub App you create from the admin, and every editor needs write access to that repo.

cloud hands sign-in to Keystatic Cloud, so someone without a GitHub account can edit. Its docs, read on October 13, 2026, list a free plan with up to 3 users per team and a Pro plan from $10 a month, plus $5 per user beyond 3.

This blog runs local mode on my machine and GitHub mode in production. It does not use the cloud mode.

3. Run the deployed admin in GitHub mode on Vercel

A Keystatic admin deployed on Vercel has to use GitHub mode, because Vercel's filesystem is read-only and the admin can only save by committing.

Keystatic's docs also ask for a host that runs Node.js for its API routes, and you copy the Keystatic environment variables to the deployed project. The GitHub App wizard has to run from localhost, since that flow creates KEYSTATIC_GITHUB_CLIENT_ID, KEYSTATIC_GITHUB_CLIENT_SECRET, KEYSTATIC_SECRET and the app slug variable.

The bug from the intro came from the switch between modes. I chose the mode with an environment variable holding the repo name, but keystatic.config.ts is also imported by the admin, which is a client component, and a plain variable is undefined in the browser bundle.

Renaming it with the NEXT_PUBLIC_ prefix fixed it. The repo name is the only value it exposes.

// keystatic.config.ts
function storage() {
  const repo = process.env.NEXT_PUBLIC_KEYSTATIC_GITHUB_REPO;
  if (!repo) return { kind: "local" } as const;
  const [owner, name] = repo.split("/");
  return { kind: "github", repo: { owner, name } } as const;
}

4. Give each language its own collection

A bilingual Keystatic blog works best with one collection per language, because a slug only has to be unique inside its collection.

In a single collection, the English and Spanish versions of one post could never share a slug. With two collections, an untranslated post simply has no sibling, and the site only advertises an hreflang alternate when that file exists.

We pair translations with a translationKey field that holds the same value on every language version. That lets the Spanish post keep a Spanish slug, and it stops two unrelated posts that happen to share a slug from being declared translations of each other.

5. Put your SEO fields and a draft box in the schema

The Keystatic schema is where a post's SEO fields become required, so an empty description never reaches the live site.

Ours requires a description of up to 200 characters, because it feeds the meta description and the blog index. It adds a tldr and FAQs that answer engines can lift whole, tags, and an updatedAt date for the sitemap's lastmod, since a fresh checkout rewrites every file's modified time.

The draft checkbox hides a post from the blog and from the sitemap. On November 23, 2026, seodraft's sitemap listed 164 URLs, 50 of them blog posts: 27 in English and 23 in Spanish. The free sitemap checker gives you the same count for your own site after each deploy.

6. Store images under public/ so their URLs resolve

Images in a Keystatic blog need a folder your site actually serves, which on Next.js means public/.

Keystatic's default saves an image next to its entry, under content/, with a src relative to the post. Nothing served that folder on our site, so those images returned a 404.

Our image field sets the directory to public/blog-images/en or public/blog-images/es and the public path to match, so the src Keystatic writes is the URL that serves the file. A short transformFilename strips accents and spaces, so a screenshot's default name never turns into %20 in a URL.

image: {
  directory: `public/blog-images/${locale}`,
  publicPath: `/blog-images/${locale}/`,
},

7. Let agent drafts arrive as files the admin can open

An AI agent can write into a Keystatic blog when each draft arrives as a file with the frontmatter your schema expects.

My agent writes through seodraft, and when I approve a post seodraft commits it to content/blog/{locale}/{slug}.mdoc with draft: true. It maps the post date to publishedAt and the updated date to updatedAt, so Keystatic opens the file like any post I wrote by hand.

One field needed a fix. Delivered posts carry {% #id %} anchors on headings for the table of contents, and Keystatic's editor rejects heading attributes its schema does not declare, so those files would not open until I added id to the heading schema.

Before any file reaches the repo, the draft goes through a fixed order. The current workflow saves the brief before the body and requires every evidence item in the brief to reach the article.

Publishing stays my call. In my first test of seodraft, on September 17, 2026, the run ended with the post marked ready. The workflow stopped at READY: I did not call delivery or publish the article.

Going live means pressing Publish in seodraft.app, which commits the file with draft: false. The CMS delivery page lists the path and frontmatter options seodraft can write.

Choose Keystatic when your posts can live in Git

Choose Keystatic when the people who edit your blog can work from a Git repository, and switch to its cloud mode when someone without a GitHub account needs to edit.

For a founder-run blog on Next.js, I would start in local mode, write the schema with the SEO fields and the draft box, and only then move production to GitHub mode with the NEXT_PUBLIC_ variable from lesson 3. If you are still picking a framework, the Astro version of this setup uses the same Keystatic pieces.

When you want the briefs, the rules and draft delivery into your Keystatic repo handled for you, try seodraft with your own agent (Claude, Cursor, or ChatGPT on Business, Enterprise or Edu). It costs $9 a month for one workspace, and the 7-day trial needs no card: your agent writes, the rules decide, you approve.

Frequently asked questions

Is Keystatic free?
Its local and GitHub modes run from npm packages inside your own project, with no Keystatic account. Keystatic Cloud is free for up to 3 users per team, and its Pro plan starts at $10 a month plus $5 per user beyond 3, according to its docs on October 13, 2026.
Does Keystatic need a database?
Keystatic needs no database. It stores content as Markdown, Markdoc, JSON or YAML files on your disk or in a GitHub repository, and its admin UI reads and writes those files.
Can Keystatic run on Vercel?
Yes, in GitHub or cloud mode. Vercel's filesystem is read-only, so the deployed admin saves by committing to GitHub. Copy the Keystatic environment variables to Vercel, and expose the repo name with a NEXT_PUBLIC_ variable if the config reads it from the environment.
Does Keystatic work with Next.js and Astro?
Yes. Keystatic publishes integration guides for Next.js, Astro and Remix. This blog runs it on Next.js 16, and the same collections and fields work in an Astro project.

About the author

Chorch · Founder of seodraft

Chorch builds seodraft. He has spent more than fifteen years building digital businesses, and he answers seodraft's support himself at chorch@seodraft.app.

XLinkedInGitHub

All posts

Your agent writes. The rules decide. You approve.

Turn the AI you already use into a complete SEO agent: measured topics, your own evidence, and rules that check every draft.

Create account

7 days free, no card needed. Then $9/month if you subscribe.

Log inCreate account
Create account
Create account

7 days free, no card needed. Then $9/month if you subscribe.

  • Log in
  • Create account