Page layout

Customization•5 min read|
|

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

{ "layout": { "contentWidth": 720, "pageWidth": 1400, "sidebarWidth": 280, "tocDepth": 3, "showDescription": true } }

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.

Width of the text column. Maximum width of the sidebar, content and table of contents together. Use "full" to run edge to edge. Width of the sidebar. Width of the table of contents. Height of the top bar. The deepest heading level in the table of contents: 2, 3 or 4. 3 shows h2 and h3. center or left. Use left to align the column with the sidebar on wide screens. Show each page's description as a subtitle under the title. Hide the previous and next links on every page. Hide the feedback widget on every page. 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.

--- title: Pricing description: Plans and limits. layout: full ---
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.

Hide the table of contents on this page. The deepest heading level in this page's table of contents, from 2 to 6. The default is layout.tocDepth, or 3. Hide the previous and next links at the bottom of the page. Hide the feedback widget on this page. Hide the Copy page menu in the page header. Text under the page title. It replaces the description when layout.showDescription is on. A small label above the title, such as the product area. Overrides the <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:

--- title: CLI reference description: Every command and flag. hide_toc: true subtitle: Every command and flag eyebrow: Reference ---

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