BackmatterPricingDocs
Contents

Folder layout

Models, content, blocks, and the catch-all route.

The first document used a model, a content file, and a route. Those folders are the registry. Adding a file is enough. Nothing else has to be imported by hand.

The tree

backmatter.config.ts
models/blog.ts
content/blog/hello.mdx
blocks/Hero.tsx
layouts/blog.tsx
app/[...backmatter]/page.tsx
.backmatter/
PathRole
backmatter.config.tsWorkspace and API settings. Models are not listed here.
models/{type}.tsexport default defineModel(...). The file name is model.type.
content/{type}/{slug}.mdxOne document.
blocks/{Name}.tsxA React component used as an MDX tag. The file name is the tag.
layouts/{type}.tsxOptional wrapper for every document of that type.
sources/{type}.tsexport default defineSource(...) for a model with external: true. Loads the outside record (a catalog product) that blocks receive as props.data. See External sources.
app/[...backmatter]/page.tsxOne route that mounts every model.
.backmatter/Generated client. Gitignored. Import it as backmatter.

route on the model is the public URL. route: "/blog/{slug}" serves content/blog/hello.mdx at /blog/hello.

Content is what happens after the file exists: the published copy, the working copy an editor changes, and the commit publish writes back to git.