A CMS built for Astro sites
A CMS for Astro gives the people who write your content a place to edit it, while Astro keeps building fast, static pages. BetterCMS does this with a first-party Astro integration: your team edits on the real page, and a publish can rebuild the site.
How BetterCMS works with Astro
Your team publishes in BetterCMS. Astro turns that content into static pages. Visitors get plain, fast HTML, with no CMS in the way.
-
Your team edits
Marketers change text, images and sections in BetterCMS, then publish.
-
Publish starts a rebuild
A webhook calls your host’s rebuild hook. On BetterCMS Cloud, the rebuild is done for you.
-
Astro builds the pages
The integration reads the published content once, during the build.
-
Visitors get static HTML
The CMS is not in the request path, so pages stay fast.
Choose how each page renders
-
Static by default
Pages are built ahead of time and served as plain HTML.
-
Server routes when needed
A page that changes faster than a build can render on each request instead.
-
Draft preview
Reviewers see unpublished work on your real Astro front end before it goes live.
Edit Astro pages without Git
Markdown in the repository works while developers write the content. Once marketing, legal or support need to change a page, a pull request for every sentence slows everyone down.
With BetterCMS they edit on the page itself and publish. Developers keep the code and the components.
- Edit in place. Text, images and whole sections, on the rendered page.
- Review and schedule. An approver and a go-live date, not a branch.
- Reuse content. One record shown on many pages, changed in one place.
Content collections or a CMS?
Use Astro content collections when the people writing the content also write the code. Use a CMS when they do not.
You can have both. In Astro 5 a collection can load from a remote source, so CMS content can sit beside your local Markdown files.
When files beat a CMS
Astro sites are often built by the people who write for them, and that is the case where adding a CMS makes the project worse.
Stay with files
- A personal site or a blog Markdown in the repository is faster to write and free to host.
- Docs the engineers own A doc change belongs in the same review as the code change.
- Content that ships with a release If copy is versioned with the code, keeping it in the repository is correct.
- No second contributor yet Add the CMS when the second person arrives, not in anticipation.
Reach for a CMS
- Writers without Git Marketing, legal and support should not need a branch to fix a sentence.
- Hundreds of similar pages Case studies, locations and product pages are records, not files.
- Scheduled or reviewed publishing A go-live date and an approver are features, not branch etiquette.
- Content reused across pages One record, read by four templates, changed in one place.
BetterCMS on Astro
What a build-time Astro site needs from a CMS, without a fetch layer to maintain.
-
Edit on the real page
Marketers change text, images and sections on the rendered Astro page, not in a form.
-
Preview before publish
Draft mode shows unpublished work on your real Astro front end.
-
An integration, not glue
Loaders and a block renderer ship in the package, so there is no fetch layer to maintain.
-
Keys stay on the server
The build reads content with a key that is never bundled into what the browser downloads.
-
Hosting if you want it
Run the Astro build yourself, or let BetterCMS Cloud host it and rebuild the site for you.
-
Markdown twins
Every page also serves as markdown, and the site publishes an llms.txt index.
The developer part is short
Add the integration, then render a page’s blocks. Draft preview needs a server route; everything else can stay static.
From the published @bettercms-ai/astro integration. Install it with npm install @bettercms-ai/astro.
---
import { loadPage } from 'bettercms:client';
import BcmsBlocks from '@bettercms-ai/astro/components/BcmsBlocks.astro';
const page = await loadPage(Astro, 'home');
---
{page && <BcmsBlocks blocks={page.blocks} />} -
The best CMS for an Astro site is a headless or hybrid one that returns structured JSON, issues a key the server can hold, and ships an Astro integration so the wiring is config rather than a fetch layer you maintain. Astro has no preference beyond that, because a CMS read is an ordinary await in page frontmatter.
-
No. Astro is a web framework, not a content system. It ships content collections, which read Markdown and MDX files from the repository and give them a schema, and in Astro 5 a collection can also be loaded from a remote source.
-
For a static route, yes: the fetch ran during the build, so the built HTML holds the old copy until the next build. A route that changes faster than a build can opt into server rendering, and then the fetch runs per request.
-
Yes, in Astro 5. A collection can use a loader that fetches from a remote source instead of reading the file system, which keeps CMS content inside the same typed collections API as the local files.
-
Use the integration’s draft mode on a server-rendered route. The loaders take the Astro object, which is how they know a request is in draft mode, and the draft secret stays server-side and never reaches the browser.
-
No, for a static build. The fetch happens once during the build and the visitor is served plain HTML, so the CMS is not in the request path at all. Server-rendered routes do add a request, which is why caching the delivery response matters there.
Your next website starts here
See BetterCMS running on your pages, not on a sample site.