Page layout
Layout settings work at two levels. The layout key in docslit.json sets widths and defaults for the whole site. Frontmatter on a page picks one of seven layouts and switches individual parts of the page on or off.
Site layout settings
Lengths are numbers, which mean pixels, or CSS lengths such as "44rem". A value that is not a valid length, or an option that is not in the allowed list, is ignored and reported by docslit validate as layout-invalid.
"full" to run edge to edge.2, 3 or 4. 3 shows h2 and h3.center or left. Use left to align the column with the sidebar on wide screens.description as a subtitle under the title.header or sidebar. See Tabs and anchors.underline or pill. When set, it overrides a theme's own tab styling.left or center.These settings win over a theme's own widths. The peppermint and folio themes turn on showDescription by default, and you can turn it off with "showDescription": false.
Under the hood each width sets a CSS variable (--content-text-w, --page-w, --sidebar-w, --toc-w, --nav-h), so you can also set them in your own stylesheet. See Design tokens.
Choose a layout for a page
Set layout in a page's frontmatter. Mintlify's mode key is accepted as an alias.
| Layout | Aliases | Sidebar | Table of contents | Width | Use it for |
|---|---|---|---|---|---|
guide |
default |
Yes | Yes | Text column | Most pages |
overview |
Yes | Yes | Wider column | Section overviews with tiles or tables | |
wide |
reference |
Yes | No | Wide column | Reference tables and long code |
center |
page |
No | No | Centered column | Standalone pages such as a policy |
frame |
Yes | No | Full width | Embedded tools, diagrams and videos | |
full |
custom, landing |
No | No | Full width | Landing pages: no breadcrumbs, pagination or page actions either |
api |
Yes | No | Three columns with examples | API reference pages, set by docslit openapi scaffold |
An unknown layout name is reported as frontmatter-invalid-layout.
Page switches
These frontmatter keys control one part of a page each. They use snake_case, and kebab-case and camelCase spellings are accepted too.
2 to 6. The default is layout.tocDepth, or 3.layout.showDescription is on.<title> tag, which is what search results and browser tabs show. The page heading is unchanged.For example, a reference page with no table of contents, a subtitle and an eyebrow:
Pages that must not appear in the sidebar, search, llms.txt or the sitemap use hidden: true, which also adds a noindex tag. noindex and searchable: false give you finer control. See Frontmatter for every key, and Pages and navigation for hidden pages.
Next steps
- Group pages into sections with Tabs and anchors
- Tune the page actions in the contextual menu
- Read every key in Frontmatter