Content collections
Browsing collections, editing entries against their schema, and the formats Stacki reads.
The CMS panel (⌥C) is the content side of the project: your collections, the entries in them, and the schema each one declares.
Opening a collection covers the canvas rather than replacing it, so the preview keeps the page it had loaded.
Collections
Collections are read from src/content.config.ts, the same declaration Astro
reads. A collection that is declared but has no entries yet is listed; one that
is broken says so rather than disappearing.
New collection creates the folder and adds the declaration.
Entries
An entry is edited as fields, generated from the collection’s Zod schema:
| Schema | Field |
|---|---|
z.string() |
Text |
z.string() with a long default |
Textarea |
z.number() |
Number |
z.boolean() |
Toggle |
z.date() |
Date |
z.enum([...]) |
Dropdown |
z.array(z.string()) |
Tag input |
reference('authors') |
Picker of that collection’s entries |
image() |
Asset picker |
The body of a Markdown entry is edited as rich text, with links, headings and lists, and the Markdown it writes is ordinary Markdown.
Formats
Entries can be Markdown or MDX with frontmatter, or data files: YAML, JSON, NDJSON, TOML and CSV. Each is read and written in its own format, so a YAML collection stays YAML.
Collection settings
The settings view of a collection edits the schema itself: adding a field, changing its type, marking it optional. Changing a schema changes what every entry in that collection is validated against, so Stacki writes the declaration and leaves existing entries alone for you to fill in.
References
A field declared as a reference() shows the entry it points at, and following
it opens that entry. The same references are what makes an author’s fields
available when you bind a post’s author to a component.