> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stage.systems/llms.txt
> Use this file to discover all available pages before exploring further.

# Blog setup

> Give a site articles: the renderers, the routes, the listing page, and the one schema that drives the editor's content-type menu.

An article body is a component stream, the same shape as a page. The admin edits it inline in the site's own rendered article through one rich-text document that adopts the server-rendered blocks, so drag-to-reorder, delete, undo and `/` inserts are native. What the writer sees is in [Guides: Articles](/editing/articles).

## The pieces

| Piece                       | Where              | Notes                                                                                                                                                      |
| --------------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Prose`                     | `components/blog/` | The rich-text run. Renders `props.html`, styled by the site's `.prose` rules                                                                               |
| `ArticleBody`               | `components/blog/` | Maps the body stream to renderers. Each entry renders as **one root element**, a direct child of the `data-e-body` container, carrying its anchors         |
| `ArticleList`               | `components/blog/` | The listing. Query-driven cards; the add lives in the section's notch. Tag card fields with `stageField("title")` and so on for live preview while editing |
| Custom blocks               | `components/blog/` | Any block the design needs beyond prose                                                                                                                    |
| `news/[slug].astro`         | `pages/`           | The public article                                                                                                                                         |
| `preview/news/[slug].astro` | `pages/`           | The gated preview the edit canvas loads. It must clear the SDK cache before reading                                                                        |
| The `news` page             | Database           | An ordinary page row holding one `article-list` component. The public listing renders through the page catch-all                                           |

The listing base path is a per-site choice (`news`, `blog`, `journal`) and is declared once in the schema.

## The schema

```ts theme={null}
articles: {
  basePath: "news",
  menu: [
    { format: "h2" },
    { format: "h3" },
    { custom: "eyebrow", label: "Eyebrow", keywords: ["kicker"] },
    { format: "bulletList" },
    { format: "quote" },
    { format: "image" },
    { block: "slider", label: "Slider", starter: { slides: [{ caption: "" }] } },
  ],
}
```

`menu` is the single source for both the `/` menu and which nodes the editor enables. A writer cannot insert a content type the site did not declare. **Media** (image or video from the library) is always available even if omitted.

## Three kinds of content type

| Kind                  | Declared as                                                                                      | Rendered by                                                                      |
| --------------------- | ------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
| Built-in prose format | `{ format }` from `text`, `h1` to `h4`, `bulletList`, `orderedList`, `quote`, `image`, `divider` | `Prose`, styled by the site                                                      |
| Custom prose format   | `{ custom, label, keywords }`                                                                    | `Prose`, a class the site styles                                                 |
| Block                 | `{ block, label, starter }`                                                                      | A registered component, draggable as a unit, with its own inline-editable fields |

## Title and date

They are row columns, not body components. The renderer emits the reserved meta anchor on the `<h1>` and the `<time>` so the editor patches the row: `stageMeta("title")` and `stageMeta("date", { date: true })`.

## Link-out items

A listing can mix internal posts with external coverage. It is still an article row: declare `linkOut: { key: "external", urlKey: "link_url" }` on the collection and use `showIf` so the URL field appears only when the toggle is on. The renderer must emit the stored URL verbatim as the href, after checking the scheme is `http(s)`.

## Embargo

Articles are the only content with a draft and scheduled embargo in the public read policy. Anything that is drafted ahead of release (case studies, press, announcements) should be an article with a custom format, never a page-per-item collection.

## Next steps

<CardGroup cols={2}>
  <Card title="Forms setup" href="/developers/structure/forms">
    The other document type.
  </Card>

  <Card title="The write model" href="/developers/editing/write-model">
    Drafts and scheduling underneath.
  </Card>
</CardGroup>
