- Documentation
- Write content
- Pages and frontmatter
Pages and frontmatter
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
Section titled “List a page”Each entry in a group’s pages is a file path from the docs folder, with no extension:
{ "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
Section titled “Frontmatter”Frontmatter is a block of YAML at the top of the file:
---title: "Install"description: "Add the package to your project."icon: "download"---
Your content starts here.titlestringThe page’s title. Without one, Specly uses the file name:
rate-limits.mdxbecomes “Rate limits”.
descriptionstringOne sentence, shown under the title. It also describes the page in search results and when the link is shared.
sidebarTitlestringA shorter name for the sidebar, when the title is long.
iconstringAn icon beside the page in the sidebar, by its Lucide name.
modestringThe page’s layout:
default,wide,center,frameorcustom. See below.
tutorialbooleanAdds a Done box to every step, a progress bar and a finish panel. See Tutorials with progress.
nextstring | 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.
rssbooleanMakes the page a changelog with an RSS feed, before its first
<Update>. See Changelog with RSS.
openapistringMakes the page an endpoint from an OpenAPI file, such as
"GET /users".
apistringMakes the page a hand-written endpoint, such as
"GET /users", with the page’s own text as its description.
playgroundstringHow this endpoint page’s Try it shows:
interactive,simpleornone.
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.
---title: "Compare plans"mode: "wide"---