Features
- Content stored as files in your Git repository
- Rich content editor with Markdoc/MDX support
- Works locally or with GitHub API
- Admin UI with live preview
Pros
- No database needed β content lives in Git
- Content changes go through Git workflow (PRs, reviews)
- Works with Astro, Next.js, and Remix
Cons
- Git-based approach limits scaling for large content volumes
- Not suited for user-generated content
- Smaller community and ecosystem
Overview
Keystatic is a Git-based CMS that stores content as markdown, JSON, or YAML files directly in your code repository. It provides a rich editing experience through an admin UI while keeping content version-controlled alongside your code in Git.
Keystatic works in two modes: local (reading/writing files directly) and GitHub (using the GitHub API for cloud-based editing). It supports Markdoc and MDX for rich content with components, and integrates with Astro, Next.js, and Remix.
When to Use
Keystatic is perfect for developer blogs, documentation sites, and content-driven websites where content should live in the same repository as code. Itβs ideal when you want Git-based content workflows with a visual editing experience.
Getting Started
npm install @keystatic/core @keystatic/astro
import { config, collection, fields } from "@keystatic/core";
export default config({
storage: { kind: "local" },
collections: {
posts: collection({
label: "Posts",
path: "src/content/posts/*",
schema: {
title: fields.text({ label: "Title" }),
content: fields.markdoc({ label: "Content" }),
},
}),
},
});