🔥 All-Access Pass — $199 USD (Regular $499) · Unlock all 2,836 Astro themes ➔
komal.nakrani
Get All-Access Pass ($199)
ThemesCategoriesDocsBlogTips & TricksPricingGet All-Access Pass ($199)
Comparisons••By Komal Nakrani

Keystatic vs TinaCMS vs Decap: Git-Based CMS for Astro

Keystatic vs TinaCMS vs Decap CMS for Astro: setup, editing UI, hosting needs, Content Collections fit and auth compared, with config code and a clear pick for each case.

#Astro#Keystatic#TinaCMS#Decap CMS#Git-Based CMS

In Keystatic vs TinaCMS (and Decap CMS), all three are git-based: content stays as Markdown, MDX, YAML or JSON files in your repository, and the CMS commits changes for you. Keystatic is the most type-safe and Astro-friendly, TinaCMS has the best visual editing and a GraphQL layer, and Decap is the simplest to bolt onto a fully static site because it is just a single-page app at /admin/.

Key Takeaways

  • All three keep content in git, so your Astro Content Collections keep working with no database.
  • Keystatic: TypeScript config, a polished admin at /keystatic, local mode for free; production editing needs an adapter.
  • TinaCMS: visual, contextual editing and a GraphQL API; production editing usually runs through TinaCloud or a self-hosted backend.
  • Decap: one HTML file and a YAML config, works on any static host; the UI and development pace are older.
  • If only developers edit content, you may not need any of them.

Why a git-based CMS fits Astro

Astro’s Content Collections read files from your repo with the glob() loader and validate frontmatter with a Zod schema. A git-based CMS gives non-developers a form to edit those same files. Every save becomes a commit, your host rebuilds, and the site updates. There is no content API to call at runtime, no database to back up, and you can always fall back to editing Markdown by hand.

The trade-off is that publishing waits for a build, and editors need some form of git access (usually through GitHub authentication). For a blog, docs site or marketing site updated a few times a week, that is a good deal. If you are still deciding between files and a hosted CMS, read the Markdown or CMS guide first.

Keystatic vs TinaCMS vs Decap at a glance

Keystatic TinaCMS Decap CMS
Config keystatic.config.ts (TypeScript) tina/config.ts (TypeScript) public/admin/config.yml (YAML)
Admin URL /keystatic /admin /admin/
Content formats Markdoc, MDX, Markdown, YAML, JSON Markdown, MDX, JSON Markdown, YAML, JSON, TOML
Visual editing Form-based with live field preview Contextual click-to-edit (React-based) Form-based with side preview
Local editing Local mode writes files directly tinacms dev with local GraphQL server decap-server local backend
Production backend GitHub mode or Keystatic Cloud TinaCloud or self-hosted backend Git Gateway or GitHub with an OAuth provider
Needs a server on your site Yes, for the admin routes in production No for the admin build, backend is hosted No
Astro integration @keystatic/astro CLI init, no Astro integration package None; static files
Maintained by Thinkmill Tina team Community, successor of Netlify CMS

Keystatic: type-safe and close to Astro

Keystatic defines collections and singletons in TypeScript with typed fields. Its Astro integration injects the admin UI and its API routes into your project.

npx astro add react markdoc
npm install @keystatic/core @keystatic/astro
// astro.config.mjs
import { defineConfig } from 'astro/config';
import react from '@astrojs/react';
import markdoc from '@astrojs/markdoc';
import keystatic from '@keystatic/astro';

export default defineConfig({
  integrations: [react(), markdoc(), keystatic()],
});
// keystatic.config.ts
import { config, fields, collection } from '@keystatic/core';

export default config({
  storage: { kind: 'local' },
  collections: {
    posts: collection({
      label: 'Posts',
      slugField: 'title',
      path: 'src/content/posts/*',
      format: { contentField: 'content' },
      schema: {
        title: fields.slug({ name: { label: 'Title' } }),
        pubDate: fields.date({ label: 'Published' }),
        content: fields.markdoc({ label: 'Content' }),
      },
    }),
  },
});

Run astro dev, open /keystatic, and edits are written straight to src/content/posts/. Switch storage to { kind: 'github', repo: 'you/your-site' } and Keystatic commits through a GitHub app instead.

The catch: Keystatic’s admin and API are on-demand routes. In production you need an adapter (Cloudflare, Netlify, Vercel or Node) for those routes, while the rest of the site stays prerendered. If you want zero server code in production, you can keep Keystatic in local mode and only edit during development, which many solo developers do.

TinaCMS: visual editing and GraphQL

TinaCMS reads your schema, builds a GraphQL API over your Markdown and MDX files, and provides an editor that can show changes in context on the page.

npx @tinacms/cli@latest init
// tina/config.ts
import { defineConfig } from 'tinacms';

export default defineConfig({
  branch: process.env.HEAD || 'main',
  clientId: process.env.TINA_CLIENT_ID,
  token: process.env.TINA_TOKEN,
  build: { outputFolder: 'admin', publicFolder: 'public' },
  media: { tina: { mediaRoot: 'images', publicFolder: 'public' } },
  schema: {
    collections: [
      {
        name: 'post',
        label: 'Posts',
        path: 'src/content/blog',
        format: 'mdx',
        fields: [
          { type: 'string', name: 'title', label: 'Title', isTitle: true, required: true },
          { type: 'datetime', name: 'pubDate', label: 'Published' },
          { type: 'rich-text', name: 'body', label: 'Body', isBody: true },
        ],
      },
    ],
  },
});

During development you run Tina alongside Astro, typically tinacms dev -c "astro dev", and the admin is served at /admin. For production, tinacms build writes the admin as static files into public/admin/, and editing goes through TinaCloud (Tina’s hosted backend that handles auth and commits) or a self-hosted backend.

Tina’s contextual click-to-edit preview is built on React. In an Astro site it works on content rendered through React components; pages built from plain .astro components get the standard form editor. Check the TinaCMS Astro docs for the current state, since this area is actively developed.

Decap CMS: the simplest static setup

Decap CMS is a React single-page app you load from a CDN. There is no npm package to install in your Astro project and no adapter to add.

<!-- public/admin/index.html -->
<!doctype html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="robots" content="noindex" />
    <title>Content Manager</title>
  </head>
  <body>
    <script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js"></script>
  </body>
</html>
# public/admin/config.yml
backend:
  name: github
  repo: you/your-site
  branch: main
local_backend: true
media_folder: public/images
public_folder: /images
collections:
  - name: blog
    label: Blog
    folder: src/content/blog
    create: true
    fields:
      - { label: Title, name: title, widget: string }
      - { label: Published, name: pubDate, widget: datetime }
      - { label: Body, name: body, widget: markdown }

Run npx decap-server next to astro dev to edit locally. In production, the GitHub backend needs an OAuth provider (a small serverless function or a hosted service), or you use Git Gateway with Netlify Identity on Netlify. The editor UI is functional but dated, and it does not understand MDX components, so it suits plain Markdown best.

Fit with Astro Content Collections

All three write files into src/content/, so your src/content.config.ts stays the source of truth for types:

// src/content.config.ts
import { defineCollection } from 'astro:content';
import { glob } from 'astro/loaders';
import { z } from 'astro/zod';

const blog = defineCollection({
  loader: glob({ pattern: '**/*.{md,mdx,mdoc}', base: './src/content/blog' }),
  schema: z.object({
    title: z.string(),
    pubDate: z.coerce.date(),
  }),
});

export const collections = { blog };

Keep the CMS fields and the Zod schema in sync. If an editor can leave a field empty that your schema requires, the next build fails with a schema error rather than shipping a broken page, which is the behavior you want. The Content Collections guide covers schemas in detail.

One format note: Keystatic’s best rich-text experience is with Markdoc (.mdoc), which needs @astrojs/markdoc. If your site is already MDX, Keystatic supports fields.mdx, and Tina handles MDX natively. Decap is best with plain Markdown.

Editor experience and authentication

Keystatic has the most modern admin of the three: clean forms, image fields, relationships, and a document editor with live structure. Editors sign in with GitHub in GitHub mode, or through Keystatic Cloud, which removes the need for every editor to have a GitHub account.

TinaCMS gives the most “what you see” editing when your pages render through React. TinaCloud handles user accounts, so editors do not need GitHub accounts.

Decap uses GitHub accounts directly, or Netlify Identity with Git Gateway. It supports an editorial workflow (draft, review, publish via pull requests) on the GitHub backend.

Choose Keystatic, TinaCMS or Decap

Choose Keystatic if you want TypeScript config, a modern admin, and a CMS that feels built for Astro. Accept that production editing needs an adapter for the admin routes, or keep it in local mode.

Choose TinaCMS if editors want contextual, visual editing and you are comfortable with React components and a hosted backend (TinaCloud) or running your own.

Choose Decap if the site must stay purely static with no adapter, content is plain Markdown, and a simple form-based editor is enough.

Choose none if developers are the only editors. Editing Markdown in your code editor with Content Collections validation is faster than any admin panel.

Komal themes store their content in Content Collections, so any of these three can point at the theme’s src/content/ folders without changing page code. Start from the Content Collections docs to see each theme’s folders, or browse the Astro themes to find a starting point.

FAQ

Is Keystatic better than TinaCMS for Astro?

Keystatic has a first-party Astro integration, TypeScript config and a modern admin, so it feels more native in Astro. TinaCMS has stronger contextual visual editing, especially for React-rendered pages, and a GraphQL API. Pick Keystatic for type safety and Astro fit, Tina for visual editing.

Does Keystatic work with a static Astro site?

The public site can stay fully static. Keystatic’s admin UI and API routes need on-demand rendering, so production editing requires an adapter such as Cloudflare, Netlify, Vercel or Node. In local mode you only edit during astro dev, which needs no adapter.

Is Decap CMS still maintained?

Decap CMS is the community-maintained successor to Netlify CMS and still receives releases, though development is slower than Keystatic or TinaCMS. It remains a practical choice for simple, fully static Markdown sites.

Is TinaCMS free?

TinaCMS itself is open source. TinaCloud, its hosted backend for authentication and commits, has a free tier for small projects and paid plans for larger teams. You can also self-host the backend instead of using TinaCloud.

Do I need a git-based CMS for an Astro blog?

Not if developers write the posts. Astro Content Collections already validate frontmatter and render Markdown or MDX from your repo. Add a git-based CMS when non-technical people need to edit content without touching files or git.