Getting Started

Running the Project

Start the dev server, open the site, and run Decap CMS locally with two terminals.

Start the dev server

From the project root:

npm run dev

Vite starts and prints a local URL, usually:

http://localhost:5173/

Open it in your browser. You should see the home page.

Available scripts

  • npm run dev — start the dev server with hot reload.
  • npm run build — build the production output.
  • npm run preview — preview the production build locally.
  • npm run check — run Svelte and TypeScript checks.
  • npm run format — format files with Prettier.

Run Decap CMS locally

Decap CMS needs a local backend to edit content during development. That backend is decap-server, and it runs in a second terminal.

Terminal 1 — SvelteKit dev server

npm run dev

Terminal 2 — Decap local backend

npx decap-server

decap-server starts a proxy that Decap uses to write to your local files. It usually runs on port 8081.

Open the CMS

With both terminals running, open:

http://localhost:5173/admin/

The trailing slash matters. /admin without a slash may redirect, but /admin/ is the canonical path. The admin page loads Decap CMS from the static/admin/index.html file.

If you see a blank page, check the browser console. The most common cause is that decap-server is not running in the second terminal.

What the local backend does

  • It serves the Decap CMS admin page.
  • It proxies Git operations to your local repository.
  • It writes changes directly to the files in src/content/ and src/lib/data/.

You do not need Netlify Identity or Git Gateway for local editing. Those are only needed after you deploy.

Next step

Read Setup Decap CMS to understand how the CMS is configured and where each collection writes.