Frontmatter

Writing3 min read||

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 title tag: Guide readtime: 3 min read --- # My page title Your 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.

Examples

Minimal frontmatter

--- title: Installation ---

Full frontmatter

--- title: Authentication guide description: Learn how to set up authentication with API keys and OAuth tag: Guide readtime: 5 min read updated: January 2026 component: Auth ---

Draft page

--- title: Upcoming features draft: 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.

Sidebar title override

--- title: Comprehensive API reference for all endpoints sidebar_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.

Next steps