Deployment

Static by default, server-rendered when you need it, with real draft preview either way.

Static by default

Shell
npm run setup:project

That produces a fully static site. For Apache hosts, there is a single command that runs setup, generates, and writes an `.htaccess` file containing yourCMS-managed redirects alongside a sensible set of security headers:

Shell
npm run dev:all

Static generation is a caching strategy, not an architecture — you can render ona server instead by changing the build command, and nothing about the contentmodel changes.

Before you deploy

  1. Step 1 — Check the environment

    Shell
    npm run cssvars:generate

    Exits non-zero on a missing or malformed variable, so CI fails at the right moment rather than producing a broken build.

  2. Step 2 — Type check and test

    Shell
    npm run fonts:generate

    The type check covers the component registry, so a schema renamed without its registration is caught here.

  3. Step 3 — Run the smoke test

    Shell
    'custom.hero': {
        element: defineAsyncComponent(() => import('./CustomHero.vue')),
        props: { ...data },
    },

    It builds and boots the app. This is the one that earns its keep — it catches the class of failure that unit tests never see, like a bad import or a build-time query that throws before your client does.

  4. Step 4 — Generate and deploy

    Shell
    npm run generate

    Upload the output. Deploy the Studio separately with sanity deploy.

What's left to you

The starter is scaffolding. The content model for _your_ client, the blocks their brand actually needs and the copy that goes in them are the real work, and they should be — that is the part worth your time. The plumbing is solved and identical across every project you will ever build. Spending a week on it again per client is the expensive habit worth breaking.