Every Markdown page can include YAML frontmatter at the top of the file. Frontmatter controls the page title, metadata, and behavior.
Basic frontmatter
Add a YAML block between --- delimiters at the top of your .md file:
---title: My page titletag: Guidereadtime: 3 min read---# My page titleYour content starts here.
Available fields
The page title. Displayed in the browser tab and used by search indexing. Every page should have a title.
A short summary of the page content. Used in `llms.txt` and the search index to help readers and AI agents find your page.
A category label displayed as a badge next to the page title. Common values: `Guide`, `Reference`, `Tutorial`, `API`.
Estimated reading time displayed in the page header. Use a human-readable format like `3 min read`.
The date this page was last updated. Displayed in the page metadata. Use a readable format like `May 2025`.
Override the title displayed in the sidebar navigation. Useful when the full title is too long for the sidebar.
A technology or category tag displayed in the page metadata. Examples: `React`, `Node.js`, `CLI`.
Set to `true` to hide this page from the built site and sidebar. The page is still accessible in dev mode for preview.
Redirect visitors to another page. Use a page slug like `/other-page`. Useful when you rename or reorganize pages.
Set to `api` for API reference pages. Uses a three-column layout with a wider content area and an examples panel on the right. Set automatically by the `openapi scaffold` command.
Examples
Minimal frontmatter
---title: Installation---
Full frontmatter
---title: Authentication guidedescription: Learn how to set up authentication with API keys and OAuthtag: Guidereadtime: 5 min readupdated: January 2026component: Auth---
Draft page
---title: Upcoming featuresdraft: true---
Pages with `draft: true` are visible when you run `docslit dev` so you can preview them. They are excluded from `docslit build` output and hidden from the sidebar in production.
API reference page
---title: Create a userdescription: Create a new user accountlayout: api---
Pages with layout: api use a wider three-column layout with an examples panel. See OpenAPI integration for the full workflow.
Sidebar title override
---title: Comprehensive API reference for all endpointssidebar_title: API reference---
The sidebar shows "API reference" while the page heading shows the full title.
Metadata display
When you include tag, readtime, updated, or component in your frontmatter, DocsLit automatically renders a metadata bar below the page title. You do not need to add any extra markup.