keystatic-setuplisted
Install: claude install-skill karero/website-builder
# Keystatic setup (scaffold-time, opt-in)
Adds an optional editor UI to the `new-website` Astro overlay. **Opt-in:** the default
scaffold is CMS-free (Markdown-in-git is the workflow). Run this only when new-website
§1 Q3 says a non-technical person edits after launch. Keystatic is git-based — it writes
Markdown/Markdoc into the repo, so "data rests in your GitHub" stays literally true and
the site stays free + static. (Keystatic is built by Thinkmill, the Keystone team.)
Prereq: the site uses **Content Collections** (new-website Q1) — Keystatic edits the
files those collections read. If the site is flat pages only, add a collection first.
## Local mode (what this skill wires up)
Edit via the dev server; Keystatic commits nothing on its own — you review and `git
commit`/`push`, Cloudflare deploys. The admin runs in `astro dev` only; the production
build stays fully static (no adapter, no auth, no server). Steps applied to the project:
1. **Install** (per the official Astro guide — verify current commands at keystatic.com):
```bash
npm install @keystatic/core @keystatic/astro
npx astro add react markdoc # admin UI (React) + content format (Markdoc)
```
2. **`astro.config.mjs`** — add the integrations. The `keystatic()` integration injects a
**server-rendered** `/keystatic` admin route, so adding it unconditionally fails the static
build with `[NoAdapterInstalled]` (verified). For local mode, **gate it to `astro dev`** —
the admin runs locally