Skip to content

Nuxt

The Nuxt 4 starter: server routes hold the key, pages render any type from the schema.

DocsGet started

Docs menuNuxt

In the Nuxt 4 starter, pages call two server routes that hold the secret key, so it never reaches the browser. Any entry renders from your schema, the visual editor works with ?mf_preview=, and t.js counts visits. Download it from Connect your site → Nuxt → Starter.

Setup in three steps

  1. Keys. Copy .env.example to .env (filled in the downloaded starter).
  2. Install. npm install with npm 11 or newer (npm 10 stops on Nuxt's dependency tree), then npm run types.
  3. Run. npm run dev and open http://localhost:3000. In production: npm run build && npm start.

Where things are

FileWhat it does
server/utils/manifolio.tsthe client, with a five-minute memory cache for published content
server/api/manifolio/[type]/index.get.tsa collection, with its schema
server/api/manifolio/[type]/[slug].get.tsone entry, with its schema
server/api/revalidate.post.tswebhook: verifies the signature, clears the cache
app/lib/view.tsrender nodes from the schema (same file in every starter)
app/app.vuet.js on public pages, the bridge in preview

Runtime config comes from .env at build time; override it in production with NUXT_MANIFOLIO_KEY, NUXT_PUBLIC_SITE_KEY and the rest.

Until @manifolio/sdk is on npm, the downloaded starter carries it in vendor/manifolio-sdk.