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
- Keys. Copy
.env.exampleto.env(filled in the downloaded starter). - Install.
npm installwith npm 11 or newer (npm 10 stops on Nuxt's dependency tree), thennpm run types. - Run.
npm run devand open http://localhost:3000. In production:npm run build && npm start.
Where things are
| File | What it does |
|---|---|
server/utils/manifolio.ts | the client, with a five-minute memory cache for published content |
server/api/manifolio/[type]/index.get.ts | a collection, with its schema |
server/api/manifolio/[type]/[slug].get.ts | one entry, with its schema |
server/api/revalidate.post.ts | webhook: verifies the signature, clears the cache |
app/lib/view.ts | render nodes from the schema (same file in every starter) |
app/app.vue | t.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.