Skip to content

Blog

Which CMS for Astro? Git-based, hosted or none

Frank Spin9 min read

For an Astro site there are three ways to manage content, and the right one depends on who edits it. If developers write the content, you may not need a CMS at all: Markdown or JSON files in Git, read by Astro's content collections. If people who don't code edit a static site, a Git-based CMS such as Keystatic, TinaCMS or Decap gives them a form and still commits the files to your repository. If several editors work at once, the content feeds more than one site or app, or you want click-to-edit on the live page, a hosted headless CMS such as Sanity or Storyblok fits better, but its on-page editing needs a server-rendered preview.

Below: how a CMS plugs into Astro 7, the three kinds side by side, a table of ten options with their free tiers and first paid plans (checked on each vendor's own pricing page on 1 December 2026), and how we do it ourselves. themes.dev runs on Astro without a CMS; our free Verso template runs on Astro with Sanity.

How a CMS plugs into Astro 7#

Astro is at version 7 (7.4 on npm on 1 December 2026). Its CMS guides list 45 systems, but the way content gets in comes down to two mechanisms.

  • Build-time content collections. A collection reads entries once, when the site is built. Files in your repository are the simplest case. A CMS can feed a collection through a content loader: a small function that fetches entries and validates them against a schema, so a page gets typed data the same way it would from a local file. The site stays static and fast; a change in the CMS needs a rebuild, usually triggered by a webhook.
  • Live content collections. Since Astro 6, a live collection fetches entries on every request instead (getLiveCollection(), getLiveEntry()). Changes show without a rebuild, but the pages need a server: an adapter and output: 'server' for those routes.

In practice, most CMS integrations still don't ship a loader. Several of Astro's own guides (Contentful, Payload) use the vendor's JavaScript client or an example repository. A fetch() in the page's frontmatter works fine for a static build; a loader mainly buys you types and one place where the data shape is defined.

The three kinds, and who each suits#

No CMS: files in Git

Posts as Markdown or MDX, data as JSON or YAML, in src/content/. Astro validates every entry against a schema when it builds, so a missing field fails the build instead of breaking a page. There is nothing to host, pay for or log in to, and every change has a commit and a review.

This suits a site where the people who write also use Git. themes.dev itself works this way: 35 blog posts as HTML files and their titles, dates and tags in one JSON file, all in the repository. It stops working when an editor who doesn't use Git needs to change a page without asking a developer.

A Git-based CMS

A Git-based CMS puts a form in front of the same files. The editor fills in fields in a browser; the CMS writes Markdown or JSON and commits it to your GitHub repository; the site rebuilds. Content stays in your repository, in a format you can read without the CMS.

  • Keystatic (MIT) has an official Astro integration, @keystatic/astro. Its admin runs as routes in your Astro site, so those routes need an adapter. Editing is in forms, not on the page.
  • TinaCMS (Apache 2.0) has @tinacms/astro with click-to-edit on the page. It works with server output, or with a static site if you wrap the editable parts in <TinaIsland>; that makes it the one option here with on-page editing on a static build.
  • Decap CMS (MIT) is the oldest of the three: a single admin page with forms and a preview pane. Astro's docs have a guide for it; Decap's own site doesn't mention Astro.

The limits come from Git itself: images live in the repository, every save is a commit and a rebuild, and two editors on the same file can conflict. For a marketing site with a handful of editors that is rarely a problem.

A hosted headless CMS

The content lives in the vendor's database and your site reads it through an API, at build time or per request. You get what a database does well: several editors at once, references between documents, drafts, scheduled publishing, roles, and the same content going to a second site or an app.

  • Sanity has the official @sanity/astro integration, with visual editing through its Presentation tool. You define the content types in TypeScript. We explain the parts and the Free plan in what is Sanity CMS.
  • Storyblok has the official @storyblok/astro integration with a live visual preview. Editors build pages from blocks in a visual editor, which suits marketing teams that want to arrange pages themselves.
  • DatoCMS has an official @datocms/astro package with click-to-edit, which it calls Content Link.
  • Contentful and Hygraph are reached with their JavaScript client or GraphQL over fetch. Hygraph documents a server-rendered live preview for Astro, and click-to-edit through its framework-agnostic SDK; Contentful has no Astro-specific editing guide.
  • Payload and Strapi are open source (MIT) and run on your own server, with a database you manage. Payload has an open-source live preview that loads your front end beside the form, whatever the framework. Strapi also sells a hosted Cloud plan.

Often left out: on-page editing with Sanity, Storyblok or DatoCMS needs a server-rendered preview (output: 'server', or an adapter for the preview routes). The public site can stay static, but you run a preview deployment next to it.

Ten CMSs for Astro compared#

Free tiers and first paid plans from each vendor's own pricing page, on 1 December 2026. Prices change; check the page before you plan a budget.

CMSKindFreeFirst paid planAstro packageOn-page editing in Astro
SanityHosted (Studio open source)20 users, 10,000 documents$15 per user a month@sanity/astroYes, needs server rendering
StoryblokHosted1 space, 1 seat (up to 2)$99 a month ($90.75 billed yearly)@storyblok/astroYes, needs server rendering
ContentfulHosted10 users, 10,000 recordsLite, €300 a month (price shown from Europe)No (JavaScript client)Not documented for Astro
HygraphHosted, GraphQL3 users, 1,000 entries$199 a monthNo (fetch)Live preview documented (server rendering); click-to-edit via its JavaScript SDK, no Astro guide
DatoCMSHosted1 collaborator, 300 records€149 a month billed yearly, €199 monthly@datocms/astroYes (Content Link), with a draft-mode preview
PayloadSelf-hosted, MITFree to run yourselfNo public paid plan; Enterprise via salesNo (example repository)Live preview (open source); click-to-edit announced for Enterprise
StrapiSelf-hosted, MIT, or Strapi CloudFree to run yourselfCloud from $35 a project a monthNo (Astro docs guide)Not documented for Astro
KeystaticGit-based, MITKeystatic Cloud free for 3 usersCloud Pro $10 a month per team@keystatic/astroNo, forms in an admin
TinaCMSGit-based, Apache 2.0Tina Cloud free for 2 users$29 a project a month ($24 billed yearly)@tinacms/astroYes, also on a static site
Decap CMSGit-based, MITFree, you host the admin pageNone neededNo (Astro docs guide)No, a preview pane

How to choose#

  1. Who edits? Only developers: start without a CMS. People who don't use Git: go on.
  2. Static site, a few editors? A Git-based CMS. Keystatic if forms are enough, TinaCMS if editors want to click on the page.
  3. Several editors at the same time, content reused across sites or apps, or a page builder? A hosted CMS. Sanity if a developer models the content in code, Storyblok if the marketing team wants a visual editor out of the box.
  4. Content must stay on your own servers? Payload or Strapi, and budget for running a database.
  5. Check the cost at your size, not the free tier: seats, records and API calls are where the plans differ, and some free tiers stop instead of charging you.

How we do it#

themes.dev has no CMS. Everything on it, from blog posts to the block catalogue, is files in the repository, because the people who write it also write the code. For sites that clients edit, we use Sanity: editors work in the Studio, with the live page beside the form.

The choice is less final than it looks if the data has the same shape either way. Our free content models (10 of them, such as person, testimonial, FAQ and event) are written for both Sanity and Astro content collections, with the same fields: a component that shows a testimonial cannot tell which one fed it. Start with files, move to Sanity when editors arrive, and the components stay. Verso, our free marketing-site template, is that second step: Astro with Sanity and a page builder of 19 sections, MIT-licensed. To build the page builder yourself, see how to build a page builder in Sanity.

FAQ#

Does Astro need a CMS?

No. Astro's content collections read Markdown, MDX, JSON and YAML from your repository and check them against a schema at build time. A CMS adds value when people who don't use Git edit the content, or when the same content goes to more than one place.

What is the best free CMS for Astro?

For a static site, Keystatic or Decap: both are MIT-licensed, store content in your Git repository and cost nothing. Among hosted CMSs, Sanity's Free plan is the most generous of those we checked, with 20 users and 10,000 documents.

Which CMS has visual editing with Astro?

Sanity, Storyblok, DatoCMS and TinaCMS have official Astro packages with on-page editing. Sanity, Storyblok and DatoCMS need a server-rendered preview for it; TinaCMS also works on a static site.

What are live content collections in Astro?

Collections that fetch their entries on every request instead of at build time, added in Astro 6. They suit content that changes often, such as stock or prices, and need server output.

Can I switch CMS later?

Yes, if your components get data in one shape whatever the source. Keep the fetching in one place (a loader or one data file) and map the CMS's fields to your own there, so a switch touches that code and not every page.

Built on Tailwind CSS v4

1750 finished blocks on shadcn/ui, React and Astro

UI Pro, from €199

Build it with

Preview

Open the page
In UI Pro: get it, €199 once

With every block and theme. 400+ buyers since 2020. Plans

UI Pro

Build your next site from finished blocks

Every block, page template and website theme from €199, paid once, with every update and everything we add later. Not ready? The free blocks are open to everyone.

blocks
1750
page templates
55
website themes
33
The Case study page template from UI Pro, built from its blocks.

This page is built from UI Pro blocks: Zandloper (article-14), Rooilijn (call-to-action-07).