How this demo works
I built this site to show how I run SEO on a headless CMS. Content lives in Strapi. Astro turns it into static HTML at build time. Vercel hosts the result. This page explains each part.
The content model
The model is defined in code, as schema files in the repo. That means every change to a field is versioned and reviewed like any other code change. Nobody edits the model by clicking in the admin.
| Type | What it holds |
|---|---|
| Article | Title, slug (generated from the title), excerpt, body, optional cover image, category, author, SEO block, FAQs, date published, date modified. Draft and publish is on. |
| Category | Name, slug, description and its own SEO block. |
| Author | Name, job title, bio, LinkedIn URL and photo. |
| Site settings | Site name, organization name and the default SEO block. |
| SEO component | Meta title, meta description, canonical URL, Open Graph image, noindex switch and keywords. |
| FAQ component | A question and an answer. An article can have several. |
I keep my own datePublished and dateModified fields. Strapi's automaticupdatedAt changes on every small save. I only want the visible "Updated" date to move when the content really changed.
SEO fields and validation
The rules live in the schema, so the admin enforces them for every editor:
- The SEO block is required on every article and category.
- Meta title is required, 10 to 60 characters.
- Meta description is required, 50 to 155 characters.
- Excerpt is capped at 200 characters. Slugs must be lowercase words joined by hyphens.
- A canonical URL, if set, must be a full https URL.
- If an article has a cover image, its alt text is required.
Drafts can be saved half-finished. Required fields are checked when you press Publish. On top of that, a small publish guard in Strapi blocks three more mistakes: a leftover [MY EXAMPLE: ...] placeholder, an H1 inside the body (the title is the only H1), and a modified date earlier than the published date.
On the page, the meta title becomes the <title>, the meta description becomes the description tag, and both feed the Open Graph and Twitter tags. The canonical defaults to the page's own URL unless an editor sets one.
How content gets from Strapi to the page
Astro fetches everything from the Strapi REST API at build time, using a read-only API token. Visitors never call Strapi. They get plain HTML files from Vercel's CDN, with no framework JavaScript. Strapi itself only answers drafts to requests that carry a token, so unpublished work never leaks through the public API.
The whole site needs 3 API requests per build: one for all articles (with category, author, SEO and FAQs populated in the same call), one for categories, and one for site settings. Lists are fetched 100 at a time. The build log prints the request count, so I can watch the monthly API quota.
This build has 8 published guides in 3 topics. Only published entries reach the site. Drafts stay in Strapi.
How a publish triggers a rebuild
- I press Publish (or Unpublish, or save a change) in Strapi.
- Strapi fires a webhook on
entry.publish,entry.updateorentry.unpublish. - The webhook calls a small rebuild listener. It ignores plain draft saves and waits a few seconds so a burst of edits becomes one build.
- The listener runs a fresh Astro build, which pulls the latest published content.
- The build is uploaded to Vercel and the new static site goes live.
For this demo, Strapi runs on my own machine, so the build runs there too and Vercel only hosts the result. With a hosted Strapi, the same webhook would call a Vercel deploy hook instead, and Vercel would build the site itself. The webhook is created from code, so it is the same either way.
The trade-off is that changes are not instant. For an editorial site that publishes a few times a week, a fast static site is worth a short wait.
Structured data and sitemap
Each page has one JSON-LD @graph with WebSite, WebPage andBreadcrumbList. Guides add Article (headline, dates, and the author as aPerson) and FAQPage when the guide has FAQs. Google stopped showing FAQ rich results for all sites on May 7, 2026 (Google Search Central), so I add FAQPage because it describes the page, not to win a rich result.
The sitemap is built from Strapi data. Each guide's <lastmod> is its dateModified. The site is noindexed, so the sitemap is only here to show the setup works.
Why this site is noindexed on purpose
This is a demo, not a real publication. I don't want it in search results. So every page sendsnoindex, nofollow twice: as a robots meta tag in the HTML, and as anX-Robots-Tag HTTP header set in Vercel's config.
The part people often get wrong is robots.txt. Mine allows crawling. That sounds backwards, but it is the only way the noindex works. Google has to crawl a page to see its noindex. If robots.txt blocked the page, Google could never read the tag. It could then still index the bare URL if other sites link to it (Google: Block Search indexing with noindex;Google: Introduction to robots.txt).
So the rule is simple. Use robots.txt to manage crawling. Use noindex to keep pages out of the index. Don't use both on the same page.
Tracking
When a Google Tag Manager container ID is set, the site loads GTM and pushes four events to thedataLayer: article_view (with the article slug and category),scroll_depth at 50% and 90%, outbound_click and faq_open. GTM sends them to GA4. Without a container ID, the site ships no JavaScript at all.
Bulk drafts through MCP
Strapi 5 has a built-in MCP server. I connected Claude Code to it with an admin token and created the categories, my author entry, and first drafts of all eight guides in one session. Each draft came in with an outline, FAQs, and a meta title and description within the limits. Every place where my own experience belongs is marked [MY EXAMPLE: ...], and the publish guard won't let a draft go live until I replace them. I edit and publish each guide myself.