Skip to content

feat: create-astro-fleet CLI + Keystatic CMS example in Meridian - #8

Merged
vairi merged 5 commits into
mainfrom
feat/astro-6-1-cli-cms
Apr 17, 2026
Merged

feat: create-astro-fleet CLI + Keystatic CMS example in Meridian#8
vairi merged 5 commits into
mainfrom
feat/astro-6-1-cli-cms

Conversation

@vairi

@vairi vairi commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Astro pinned to ^6.1.7 across all sites (was ^6). Lockfile already resolved to latest; this tightens intent.
  • create-astro-fleet CLI — new package with init (scaffold a new fleet from the template) and add (add a site to an existing fleet) subcommands. Interactive prompts via @clack/prompts, giget-based template fetch, non-interactive flags (--domain, --preset, --template, --keep-demos).
  • Keystatic CMS in Meridian — working example of editable content. insights collection with Markdoc content, three seed entries, list + detail pages at /insights. Admin at /keystatic in dev; production build stays fully static (integration gated to dev).
  • docs/adding-a-cms.md — explains the Meridian pattern, how to replicate it on another site, the monorepo access-control caveat, and when to reach for Sanity/Directus/Decap/etc instead.

Why

  • The CLI removes the git-clone-then-edit friction for first-time users and gives fleet operators a single cross-platform command (new-site.sh stays for bash users).
  • The CMS example turns an abstract "you can add one" claim into a working reference that users can copy from. Meridian's existing Insights nav link is now real.
  • SEO work deferred — to be tackled in a follow-up using the existing astro-seo skill.

Test plan

  • bun install --frozen-lockfile works from clean
  • bun run build — all 4 sites build cleanly from scratch
  • CLI --help and --version render correctly
  • CLI add <domain> <preset> scaffolds a working site (verified by building the scaffolded output)
  • Meridian /insights list and detail pages render in prod build
  • Meridian /keystatic admin loads in astro dev (HTTP 200, Keystatic React island present)
  • Manual check of Keystatic admin UX in a browser (reviewer pass)
  • bunx create-astro-fleet end-to-end against the merged branch (post-merge smoke)

Follow-ups (not in this PR)

  • SEO overhaul using the astro-seo skill (content collection Zod schema for SEO constraints, sitemap improvements, JSON-LD, llms.txt, etc.)
  • Publish create-astro-fleet to npm once the repo URL in the PR is merged

Scaffolds a new fleet from a giget template (default github:indivar/astro-fleet)
and adds new sites to an existing fleet. Replaces the bash new-site.sh flow for
cross-platform use. Uses @clack/prompts for interactive UX; supports non-
interactive mode via flags (--domain, --preset, --template, --keep-demos).
Demonstrates the CMS pattern for the Astro Fleet template:
- @keystatic/astro integration gated to dev (output stays 'static')
- insights content collection using @astrojs/markdoc
- three seed entries rendered at /insights and /insights/[slug]
- nav updated to point Insights at the real page

Admin UI available at http://localhost:4321/keystatic in dev. Production
editing requires switching to server output + adapter; see docs/adding-a-cms.md.
Two workflows (build.yml and ci.yml) were firing on every push and PR.
build.yml did not set up Node and fell back to the runner's default
(Node 20), which Astro 6 rejects (requires >=22.12). ci.yml already sets
up Node 22 correctly, so every commit produced one green + one red run.
Deleting build.yml leaves ci.yml as the single canonical pipeline.
@vairi
vairi merged commit 2e5aff8 into main Apr 17, 2026
1 check passed
@vairi
vairi deleted the feat/astro-6-1-cli-cms branch April 17, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants