The Best CMS for a Static Site: Headless Content + Rebuilds
Static sites are fast, cheap, and secure — until someone non-technical needs to edit content. Then you're stuck: either they learn Markdown and Git, or you become the bottleneck for every typo fix. The fix isn't abandoning your static site generator. It's putting a proper CMS behind it as the content source, so your build stays static and your editors get a real interface.
This guide explains how a headless CMS pairs with a static site generator, and how to pick one that fits the Jamstack workflow.
The static site content problem
A static site generator — Astro, Next.js, Hugo, Eleventy, Gatsby — turns content into pre-built HTML. The result is excellent: no database at request time, fast loads, a small attack surface. But the content usually lives in Markdown files in a Git repo. That's fine for developers and miserable for everyone else.
You need a CMS that:
- Gives editors a real UI — no Markdown, no Git, no pull requests to fix a headline.
- Serves content over an API your generator can fetch at build time.
- Triggers a rebuild when content changes, so the static site updates.
This is the headless CMS pattern: the CMS manages content, your generator renders it, and the two talk over an API.
The short answer
For a static site, you want a headless CMS with a clean content API and rebuild webhooks. The CMS holds the content and notifies your host (Vercel, Netlify, Cloudflare Pages) to rebuild when an editor publishes.
UnfoldCMS is a self-hosted CMS (Laravel 12 + React 19) that ships a full REST API at /api/v1 and outgoing HMAC-signed webhooks — exactly what you need to feed a generator and trigger builds. It's self-hosted, so your content stays on your infrastructure while your static front end deploys anywhere.
How the headless-for-static setup works
The flow is simple:
- Editors write and publish in the CMS admin.
- Your static generator fetches content from the CMS API at build time.
- On publish, the CMS fires a webhook to your host's build hook.
- The host rebuilds and deploys the updated static site.
Your visitors always hit pre-built HTML — fast and secure. Your editors never touch code. See headless CMS for the Jamstack: when it helps for when this pattern is worth it.
The API: what UnfoldCMS gives your generator
The content API is the whole point of a headless-for-static setup. UnfoldCMS ships a versioned REST API at /api/v1 with public read endpoints — no auth needed for published content:
| Endpoint | Returns |
|---|---|
/api/v1/posts |
Paginated list of published posts |
/api/v1/posts/{slug} |
A single post (404 for drafts) |
/api/v1/pages/{slug} |
A single page |
/api/v1/categories |
Categories |
/api/v1/categories/{slug}/posts |
Posts in a category |
/api/v1/search |
Site search |
/api/v1/menus/{location} |
A menu tree |
Your Astro or Next.js build calls these, gets JSON, and renders pages. Note it's REST, not GraphQL — there's no GraphQL endpoint. For most static builds fetching lists and single items, REST is all you need. See what is a content API.
Rebuild webhooks: keeping the static site current
A static site only updates when it rebuilds. The link between "editor publishes" and "site rebuilds" is a webhook. UnfoldCMS has this built in:
WebhookSubscriptionholds the target URL (your Vercel/Netlify build hook) and the events it listens to.- On a content event — post publish, update, delete — the CMS fires a signed POST to that URL.
- The signature is HMAC-SHA256, so your host can verify the request really came from your CMS.
- Delivery attempts are logged, so you can see if a rebuild trigger failed.
Point the webhook at your host's deploy hook and every publish triggers a fresh build automatically. Manage it all from the admin API at /api/v1/admin/webhooks. See headless CMS webhooks explained.
Why self-hosted for a static setup
Since your front end is static and deploys to a CDN anyway, why self-host the CMS?
- Your content stays yours. No per-API-call metering, no SaaS content lake you rent.
- Flat cost. A small server runs the CMS regardless of how many builds you trigger.
- No lock-in. REST is a standard; you can point any generator at it, or migrate.
The static front end still gets all the Jamstack benefits — speed, security, cheap CDN hosting. The CMS behind it is just a content source you control. See best self-hosted headless CMS 2026.
Which generators does this work with?
Any generator that can fetch JSON at build time — which is all of them. We have setup-oriented guides for the common ones: headless CMS for Next.js, the Astro CMS tutorial, and CMS for Eleventy. The pattern is identical: fetch from /api/v1, render at build, rebuild on webhook.
When a static setup isn't the right fit
Be honest about when static + headless is overkill. Skip it if:
- Your content changes constantly (many times per minute) — rebuild latency becomes a problem, and a server-rendered or traditional CMS fits better. See when not to use a headless CMS.
- You need real-time personalized content per user — static pre-building can't do that alone.
- You have no build pipeline and don't want one — a traditional CMS that renders on request is simpler.
Frequently asked questions
What is the best CMS for a static site?
A headless CMS with a clean content API and rebuild webhooks is best for a static site — it holds the content, feeds your generator at build time, and triggers a rebuild on publish. UnfoldCMS fits because it ships a REST API at /api/v1 and HMAC-signed outgoing webhooks, and self-hosts so your content stays yours.
How does a CMS trigger a static site rebuild?
Through a webhook. When an editor publishes, the CMS fires a signed POST to your host's build hook (Vercel, Netlify, Cloudflare Pages), which rebuilds and deploys the static site. UnfoldCMS's webhooks are HMAC-SHA256 signed so your host can verify them.
Does UnfoldCMS support GraphQL for static builds?
No — the API is REST only, at /api/v1. For most static builds fetching post lists and single items, REST covers everything. There's no GraphQL endpoint.
Which static site generators work with it?
Any generator that fetches JSON at build time — Astro, Next.js, Hugo, Eleventy, Gatsby, and others. The pattern is the same: fetch from the REST API, render at build, rebuild on webhook.
The takeaway
Keep your static site's speed and security, but give editors a real interface by putting a headless CMS behind it. You need a clean content API and rebuild webhooks — UnfoldCMS ships both (REST at /api/v1, HMAC-signed webhooks) and self-hosts so your content stays yours. Just don't reach for static + headless if your content changes by the second.
Related: Headless CMS for the Jamstack: when it helps · Headless CMS webhooks explained · Headless CMS for Next.js
Free & Open Source
Own your CMS. No subscriptions.
Unfold CMS is free to download and self-host. Built on Laravel + React, full source code included.
Share this post: