Headless CMS: why I chose Nuxt and Prismic for this site
Vue.js & Nuxt.jsBy Brahim Anjjar · Published on , updated on · 5 min readA headless CMS is a content management system without a built-in website: it stores and organizes your content, then serves it through an API to whatever site or app you choose. Displaying it is left to a framework such as Nuxt.
This site works exactly that way, with Prismic for the content and Nuxt for the display. Here is why I made that choice, how it is built, and when I would advise against it.

Headless CMS: the definition
A traditional CMS like WordPress does two jobs: it manages the content and it generates the pages, through a theme. A headless CMS keeps only the first. It has no “head”, meaning no front end: the content comes out as data (JSON), and the developer who builds the site decides how to display it.
In practice, editors write in an online interface, and the site queries the CMS API to fetch the text, images and page structure. The best-known headless CMSs are Prismic, Contentful, Sanity, Storyblok and Strapi.
Headless vs traditional CMS: the differences
- Display: a traditional CMS imposes its theme engine; a headless CMS leaves you free to pick the framework (Nuxt, Next.js, Astro…).
- Performance: a headless site can be pre-rendered and served from a CDN, with no database query on every visit.
- Security: no admin interface exposed on the public site, and fewer plugins to maintain.
- Autonomy: with a traditional CMS, an advanced user can change everything alone; with a headless CMS, adding a new type of block needs a developer.
I compare the two approaches in detail in Nuxt.js or WordPress: which technology should you choose?
Why Nuxt and Prismic for anjjar.com
This site had to be bilingual (French and English), fast, well ranked, and editable without touching the code: pages, articles, site settings, menus. Three reasons led me to Prismic with Nuxt.
Pages built from blocks
Prismic organizes content into “slices”, reusable blocks. The site has 41 of them today: hero, text, FAQ, pricing, testimonials, gallery, steps and more. Each page is a stack of these blocks that I can reorder from the Prismic interface. Each block’s model is defined in the code and versioned with Git, so a structural change can’t break the site in production.
Built-in multilingual support
Every document exists in fr-fr and en-us, linked to each other. Nuxt uses that link to generate the hreflang tags and the language switcher: a French page always points to its English version, and the other way round.
Nuxt for SEO and speed
Nuxt renders pages on the server: Google receives complete HTML, with the title tags, structured data and internal links. The result is then cached on Netlify’s CDN, which keeps response times short. To go further, read What is Nuxt.js?
How it is built
The architecture comes down to four steps:
- Content is written and published in Prismic.
- Pages never talk to Prismic directly: they go through Nuxt server routes. The API access token stays on the server, never visible in the browser.
- Rendered pages are cached on Netlify’s CDN for up to 7 days.
- On every publish, Prismic calls a webhook that clears the cache: the new content is live on the next request.
The webhook is only a few lines long. It checks a shared secret, then asks Netlify to purge the cache:
// server/api/revalidate.post.ts (simplified)
import { purgeCache } from '@netlify/functions'
export default defineEventHandler(async (event) => {
const body = await readBody<{ secret?: unknown } | null>(event).catch(() => null)
const { prismicWebhookSecret } = useRuntimeConfig(event)
if (!isValidWebhookSecret(body?.secret, prismicWebhookSecret)) {
throw createError({ statusCode: 401, statusMessage: 'Invalid secret' })
}
await purgeCache()
return { purged: true }
})
The 7-day cache is only a safety net: if a webhook call fails, the content still updates within a week.
Previewing a draft without publishing it
The trickiest part was draft previews. When an editor clicks “Preview” in Prismic, the site receives a preview cookie and shows the draft. The risk: the CDN caching that version and serving it to visitors.
Two rules prevent it. Netlify’s cache is keyed on that cookie (the Netlify-Vary header), and any request carrying the cookie is marked as not cacheable. Visitors never see a draft, not even by accident.
A simulator for blocks
Prismic also offers a “slice simulator”: a page on the site that shows a block with test data while you edit it. It is handy for checking a new block on mobile and desktop before using it on a real page.
The limits, honestly
- A new type of block needs a developer: it has to be modeled, its display coded and deployed. In return, editors can’t break the layout.
- The setup costs more up front than a WordPress theme: server routes, caching, previews, webhook. That work is done once, but it is real.
- You depend on a third-party service and its plans. Content stays exportable, but moving to another CMS would take work.
- A few technical details to know: for example, locally, Safari may refuse the preview cookie on http://localhost, so preview with Chrome or Firefox. In production (https), everything works.
Which projects should use a headless CMS?
A headless CMS with Nuxt is a good choice if:
- speed and search rankings matter a lot to your business;
- the site is multilingual or has to share its content with an app;
- you want a consistent layout that your team can’t break;
- the site has to grow with custom features.
For a small business website you want to run entirely on your own, with ready-made plugins, WordPress is often simpler and cheaper. Site speed has a direct impact on SEO, headless or not: I cover it in Why website speed matters for SEO.
Headless CMS: frequently asked questions
What is a headless CMS?
A content management system that doesn’t generate the pages itself: it serves the content through an API, and a framework like Nuxt takes care of displaying it.
Is Prismic free?
Prismic offers a free plan suited to small sites, and paid plans depending on the number of users and your needs. Check the current terms on Prismic’s website before choosing.
Is a headless CMS good for SEO?
Yes, as long as the site is server-rendered or pre-rendered, as with Nuxt: search engines then receive complete HTML. A headless site rendered only in the browser is harder to rank.
Can you move from WordPress to a headless CMS?
Yes. You need to migrate the content, rebuild the page templates as blocks and set up 301 redirects to keep the rankings of the old URLs.
Considering a Nuxt site with a headless CMS like Prismic? See my Nuxt.js development service, or tell me about your project.
Need help with this?
Freelance Nuxt.js Developer


