Frontmatter
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:
Available fields
llms.txt and the search index to help readers and AI agents find your page.
Guide, Reference, Tutorial, API.
3 min read.
May 2025.
React, Node.js, CLI.
true to hide this page from the built site and sidebar. The page is still accessible in dev mode for preview.
/other-page. Useful when you rename or reorganize pages.
Examples
Minimal frontmatter
Full frontmatter
Draft page
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.
Sidebar title override
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.
Next steps
- Learn how to organize pages in the sidebar
- Make your content searchable with search and SEO