Skip to content

Add Keystatic CMS integration #73

Description

@VibratingKoala

Requirement

Add Keystatic as a CMS option alongside the existing microCMS, so users can scaffold an Astro project with a Git-based, locally-editable CMS out of the box.

Scope for the first iteration:

  • Bases: all Astro bases (astro, astro-react, astro-vue). Excluded from Nuxt and Vite (Keystatic has no integration for them).
  • Storage: generate storage: { kind: 'local' } by default — zero external setup, works on first dev run. Include a commented github block + README note so users can switch when deploying.
  • React renderer: Keystatic's admin UI is React-based, so auto-inject @astrojs/react (+ react/react-dom) for astro and astro-vue bases where it isn't already present.

Implementation notes (details and test plan to be documented in the PR):

  • Re-key CMS templates by provider: templates/cms/{cms}/{group} (move existing microCMS templates under templates/cms/microcms/...).
  • Add the keystatic entry to cms[] in registry.json with excludeGroups: ["nuxt", "vite"] (already enforced by the wizard).
  • Conditionally inject Keystatic + React + output: 'hybrid' into astro.config.mjs.tmpl.
  • Add the React cross-cutting rule in packagejson.go; update the --cms flag help and add CMS validation in cmd/create.go.
  • Add keystatic.config.ts.tmpl (local storage, sample collection) under templates/cms/keystatic/astro/.

Open item to resolve during implementation: Astro output: 'hybrid' requires an adapter to build; reconcile the default (@astrojs/node) with the existing Cloudflare deploy option.

Notes

Related Issues

  1. Add Shadcn component integration #17 (Shadcn integration — sibling "integration" feature, no dependency)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions