---
title: "Pages and frontmatter"
description: "Write a page as an MDX file, list it in docs.json, and set how it looks with frontmatter."
---

A page is one `.md` or `.mdx` file in your docs folder. It goes on your site when you list it in `docs.json`.

## List a page

Each entry in a group's `pages` is a file path from the docs folder, with no extension:

```json docs.json
{
  "navigation": {
    "tabs": [
      {
        "tab": "Documentation",
        "groups": [
          {
            "group": "Get started",
            "pages": ["introduction", "guides/install"]
          }
        ]
      }
    ]
  }
}
```

`guides/install` is the file `guides/install.mdx`. The order of the list is the order in the sidebar. A file that no
group lists isn't published.

## Frontmatter

Frontmatter is a block of YAML at the top of the file:

```mdx guides/install.mdx
---
title: "Install"
description: "Add the package to your project."
icon: "download"
---

Your content starts here.
```

- `title` (string): The page's title. Without one, Specly uses the file name: `rate-limits.mdx` becomes "Rate limits".

- `description` (string): One sentence, shown under the title. It also describes the page in search results and when the link is shared.

- `sidebarTitle` (string): A shorter name for the sidebar, when the title is long.

- `icon` (string): An icon beside the page in the sidebar, by its [Lucide](https://lucide.dev/icons) name.

- `mode` (string, default: `default`): The page's layout: `default`, `wide`, `center`, `frame` or `custom`. See below.

- `tutorial` (boolean): Adds a Done box to every step, a progress bar and a finish panel. See [Tutorials with progress](/write/tutorials).

- `next` (string | string[]): The pages a finished tutorial offers next, as paths from the docs folder. Without it, the tutorial offers the next page
  in the same tab.

- `rss` (boolean): Makes the page a changelog with an RSS feed, before its first `<Update>`. See [Changelog with RSS](/write/changelogs).

- `openapi` (string): Makes the page an endpoint from an OpenAPI file, such as `"GET /users"`.

- `api` (string): Makes the page a hand-written endpoint, such as `"GET /users"`, with the page's own text as its description.

- `playground` (string): How this endpoint page's Try it shows: `interactive`, `simple` or `none`.

## Modes

`mode` changes what surrounds the page's content.

| Mode | Sidebar | Right column | Title | Content width |
| --- | --- | --- | --- | --- |
| `default` | Yes | Yes | Yes | Reading width |
| `wide` | Yes | No | Yes | Reading width |
| `center` | No | No | Yes | Reading width |
| `frame` | Yes | No | No | Full |
| `custom` | No | No | No | Full |

The right column holds the page's actions, its contents (**On this page**) and its margin notes. With `custom`, the page owns
everything between the header and the footer.

```mdx
---
title: "Compare plans"
mode: "wide"
---
```
