sitecms for Nuxt

A headless CMS for Nuxt sites where the client edits the content

By Updated

Short answer

sitecms is a hosted headless CMS where your client edits text, images, posts and prices on a Nuxt site in a ready-made panel. npx sitecms-nuxt init adds a Nuxt module with composables such as useSitecmsContent(), a signed revalidate webhook and live preview. It needs Nuxt 4, not Nuxt 3. The panel is in Swedish.

Who is sitecms for Nuxt for, and who is it not for?

  • It fits a small business site made with Nuxt 4, where the client changes text, images, news, services, prices and simple lists (team members, case studies, opening hours) without calling you.
  • It fits developers and agencies who want a hosted panel instead of running a CMS per client, at a fixed monthly price by number of sites and with unlimited editors.
  • It fits when the editor reads Swedish, and the site may still publish content in up to 10 languages.
  • It does not fit when the editor needs an English panel.
  • It does not fit when the content needs relations between content types, a GraphQL API, a visual page builder or more than 20 content types, 30 fields per type or 2,000 entries per type.
  • It does not fit when the CMS must run on your own server: sitecms is a hosted service only.

How do I connect a Nuxt site?

  1. Create an account and a site in the panel and copy the API key from the site's Integration page.
  2. Run npx sitecms-nuxt init in the project root and paste the key (or pass it: npx sitecms-nuxt init <key>).
  3. Read content with the composables, as below.
  4. Add CMS_API_KEY as an environment variable where the site is hosted, and deploy.
  5. Invite the client by email as an editor.
bash
npx sitecms-nuxt init
pages/index.vuevue
<script setup lang="ts">
import { text } from "sitecms-nuxt/helpers";

const { data: content } = await useSitecmsContent();
const { data: posts } = await useSitecmsPosts();
</script>

<template>
  <main v-if="content">
    <h1 v-bind="editable('home', 'hero.title')">{{ text(content, "home", "hero.title", "Welcome") }}</h1>
    <NuxtLink v-for="post in posts" :key="post.slug" :to="`/news/${post.slug}`">{{ post.title }}</NuxtLink>
  </main>
</template>

The init command checks the key first, saves CMS_API_KEY in .env (Nuxt reads .env, not .env.local) and makes sure .gitignore covers it, installs the package, adds sitecms-nuxt to modules in nuxt.config.ts, creates sitecms.config.ts, and adds both prebuild and pregenerate scripts that run sitecms-nuxt sync, because nuxt generate does not run prebuild. The module adds its routes itself, so there are no files to create.

The composables fetch through the module's own server route, so the API key never reaches the browser. The helpers (text, image, block, seo) are imported from sitecms-nuxt/helpers, and editable is auto-imported in templates. More in the documentation.

What does sitecms-nuxt give you?

WhatIn sitecms-nuxtGood to know
Page contentuseSitecmsContent() with the helpers from sitecms-nuxt/helpersRendered on the server and sent along in the payload.
PostsuseSitecmsPosts() and useSitecmsPost(slug)Published posts only. A missing post gives null, so the page decides on the 404.
Custom content typesuseSitecmsEntries(key) and useSitecmsEntry(key, slug)Published entries only, with limit and offset.
LanguagesuseSitecmsContent({ locale: "en" }), same option on every composableSent only when set. A missing translation falls back to the default language.
Server codeuseSitecms(event) in server/, auto-importedThe full client, including quote requests. purgeSitecmsCache() clears the caches by hand.
Revalidate webhookPOST /api/sitecms/revalidate, added by the moduleSigned. Clears the Nitro caches: composables, route rules, cached handlers and functions.
Live previewGET /api/sitecms/preview, a client plugin and frame-ancestors headersNeeds a server (SSR or hybrid). Applies to useSitecmsContent(); posts and entries show published content.
Visitor statisticsPOST /api/sitecms/events and a client pluginOn by default. No cookies. Needs a server.
CLIsitecms-nuxt init, sync, check, doctor, pullWithout a key, sync skips with a warning in the build log; --strict fails the build instead.

How does the site update when the client saves or publishes?

sitecms calls the signed revalidate route, and a verified call clears the Nitro caches, so the next visit renders fresh content. Content from the composables is cached for 60 seconds by default (cacheSeconds, always 0 in nuxt dev).

SSR or hybrid (`nuxt build`)Fully static (`nuxt generate`)
ComposablesRendered on the server, cached for cacheSecondsPrerendered at build time, sent along in the payload
Update after a save or publishThe revalidate route clears the cache, and calls a deploy hook if SITECMS_DEPLOY_HOOK_URL is setPaste a deploy hook URL as the revalidate URL in the panel, and the site is rebuilt
Live previewYesNo (turned off automatically)
Visitor statisticsYesNo (turned off automatically)

What are the limits?

Read from the code. The limits are the same in every plan.
WhatLimit
Pages per site100
Custom content types (collections) per site20
Fields per content type30
Entries per content type2,000
Entries per API request1 to 200 (default 100), paged with offset
Languages per site10
Custom roles per site20, built from 11 permissions
Version historyThe 50 latest versions of each item, plus every version from the last 90 days
Scheduled publishing2 minutes to 1 year ahead, published with a few minutes' delay
Posts and editorsNo limit
  • Field types in custom content types: text, richtext, image, number, boolean, date, select, url. There are no relations between content types and no GraphQL API.
  • Only pages can be previewed on your site. Posts and entries in custom content types cannot: their drafts are visible in the panel only.
  • Routing, the language switcher and hreflang tags for a multilingual site are yours to build. sitecms delivers the content per language with ?locale=.
  • sitecms-nuxt is version 0.1.1, released with sitecms 1.0, so expect changes. Nuxt 3 is not supported. Node 20.19 or later is required (on Node 22, 22.12 or later).

What does it cost?

The price is the full amount: no VAT is added, because the company behind sitecms is not VAT-registered. Annual billing costs ten months instead of twelve.
PlanSitesPer monthPer year
Solo1SEK 149SEK 1,490
Studio5SEK 499SEK 4,990
Byrå20SEK 1,490SEK 14,900

The price is per account, by number of sites. Every feature, every framework package and every limit above is the same in every plan, and editors cost nothing extra. The first 30 days are free with up to 20 sites and no card. If you do not pay when the trial ends, the panel is locked so nobody can edit. The website keeps showing the content that was saved last. More on the pricing page.

Frequently asked questions

Does sitecms-nuxt work with Nuxt 3?

No. The module needs Nuxt 4. Nuxt 3 has not been tested and is not declared as supported.

Does it work with nuxt generate?

Yes. The content is prerendered at build time, and init adds a pregenerate script so that the fields are synced first. To update the site when the client saves or publishes, paste a deploy hook URL as the revalidate URL in the panel. Live preview and visitor statistics need a server and are turned off on a fully static site.

Why does a change sometimes take a minute to show?

Content from the composables is cached in Nitro for 60 seconds by default. The webhook clears the cache, but only on the instance that receives it. On serverless or with several instances, use shared storage for the cache or lower cacheSeconds.

Does the API key reach the browser?

No. The module keeps the key in private runtime config and reads it on the server at runtime. The composables go through the module's own server route.

Does my client need to understand Swedish?

Yes, the person who edits should be comfortable reading Swedish, because the panel, the emails and support are only in Swedish. You as the developer do not need Swedish to integrate, and the field labels the editor sees are the ones you write in sitecms.config.ts.

What does it cost?

Solo (1 site) SEK 149 per month, Studio (5 sites) SEK 499 per month, Byrå (20 sites) SEK 1,490 per month. The price is the full amount: no VAT is added, because the company behind sitecms is not VAT-registered. Annual billing costs ten months instead of twelve. The first 30 days are free and need no card.

Sources

Read more