What’s in a Collection?
Every collection in your manifest has:- An id — the stable identifier (
blog,products,case-studies) - A name — the human label shown in the CMS panel
- A path — where entries live on disk (
content/blog/) - A format —
mdx(frontmatter + body) orjson(structured data only) - Fields — the schema each entry must conform to
- An optional routePattern — the URL each entry maps to
- An optional defaultSort for the entry list view
Creating a Collection
There are three paths. Pick whichever matches your comfort level.- Ask the AI
- CMS Panel
- Manual edit
The fastest way. In the AI chat:The AI will:
- Read your existing manifest
- Propose the collection schema (fields, format, route)
- Confirm with you
- Save the manifest update
- Optionally create a seed entry so the collection isn’t empty
Naming Conventions
A few rules to keep things consistent across collections:id— lowercase, hyphenated, singular when ambiguous. Good:blog,case-study,team-member. Avoid:blog_posts,BlogPosts,posts(too generic).name— Title Case, plural. Good:Blog Posts,Case Studies,Team Members.path—content/<id>orcontent/<plural>. Whichever you pick, be consistent across the manifest.- Field
name— camelCase. Good:publishedAt,heroImage,seoTitle. Avoid:published_at,Hero-Image.
Format: MDX vs JSON
Pickmdx when entries have a substantial long-form body and you want Markdown features (headings, embeds, components) in that body. Pick json for purely structured data.
MDX collections require exactly one field with
isBody: true. JSON collections must not have any. The Collection Manager catches this for you; if you hand-edit the manifest, the validator will too.References Between Collections
Areference field lets one collection point at another. Common patterns:
- A
blogpostreferencesan entry inauthors - A
case-studyreferences one or moreproducts - A
productreferences entries incategories - A
blogpost references related entries inblogitself (self-reference is allowed)
Reusable Patterns
Below are battle-tested schemas for the most common collection types. Use them as starting points and adapt fields to your site.Blog
Products (catalog)
Team Members
Testimonials
FAQs
Case Studies
Site Settings (singleton)
Editing a Collection’s Schema
You can edit an existing collection’s schema at any time:- Add a field — safe. Existing entries get the new field’s default; the form shows it on next open.
- Remove a field — safe but lossy. The data stays in the file; re-adding a field with the same name restores the editor.
- Rename a field — invasive. Old data is orphaned. Ask the AI to write a migration if you have many entries.
- Change a field’s type — risky. Some types are convertible (
stringtomarkdown); most aren’t. Test on a draft branch.
Singleton Collections
Set"singleton": true on a collection to enforce a single entry — useful for site settings, the homepage hero, or a single about page. The CMS panel skips the entry list and goes straight to the form.
What’s Next?
Add a Collection
Three paths to add a new collection
Field Types
Every supported field type
References
Link collections with reference fields
Migrate to CMS
Move hardcoded content into CMS collections