astroadmin

v1.2 · MIT · used by the author on client sites · this page is edited with it

src/content/sections/01-hero.md

The editor your Astro schemas already describe.

AstroAdmin reads src/content.config.ts and generates the admin — forms from your Zod schemas, a block editor for discriminated unions, live preview through your own dev server. Saving writes markdown to your repo. Publishing is a git push.

$ cd your-astro-site
$ npx astroadmin dev
src/content/sections/02-the-editor.md

what it looks like

The AstroAdmin editor: on the left, a form for the page's hero block — heading, subheading, and image fields — generated from the site's schema; on the right, the site itself rendered live in its own dev server.

A production editing session: the block editor on the left is the form AstroAdmin generated from that site’s hero schema; the preview on the right is the site’s own dev server rendering the edit as it’s typed.

src/content/sections/03-this-page.md

this page is a folder of markdown files

Every section of this page is one markdown file in a public repo — the tag above each heading names it. This one starts:

---
type: section
order: 3
heading: this page is a folder of markdown files
---

The schema in src/content.config.ts declares three section types. AstroAdmin reads that schema and generates a form for each one. Editing this paragraph in AstroAdmin writes this file, reloads the preview, and Publish creates a commit.

There is no database. Remove AstroAdmin and the Astro site still builds, because the build reads the same markdown files through Astro’s own glob() loader.

src/content/sections/04-how-it-works.md

how it works

src/content/sections/05-what-it-does-not-do.md

what it doesn't do

src/content/sections/06-hosted.md

hosted, if you want it

The self-hosted editor is the product. A hosted version — connect a repo, invite your editors, someone else worries about the server — is under consideration. What gets built first depends on who turns up.

Add yourself to the waitlist issue or email james@cloudship.co.uk.