Runir Docs

Learn how to write documentation pages with frontmatter and markdown.

Writing Content

Every documentation page is a markdown file in your docsDir directory.

Frontmatter

Each file should start with YAML frontmatter:

---
title: Page Title
description: Brief description shown in search results.
tags: [keyword, another-keyword]
---
Field Required Description
title Yes Page title, used in search and browser tab
description No Short description for search results
tags No Array of keywords to improve search relevance

File routing

Files map to URLs based on their path relative to docsDir. The basePath from your config is automatically prepended.

File path URL (with basePath: "") URL (with basePath: "/docs")
docs/index.md / /docs/
docs/quick-start.md /quick-start /docs/quick-start
docs/api/auth.md /api/auth /docs/api/auth
docs/api/index.md /api /docs/api

Standard markdown

All standard markdown is supported:

  • Bold and italic text
  • Links
  • Inline code
  • Fenced code blocks with syntax highlighting
  • Tables
  • Ordered and unordered lists
  • Horizontal rules
  • Headings (h1 through h4)

Headings at levels 2-4 (##, ###, ####) automatically appear in the "On this page" table of contents on the right side.

When you run runir build or runir dev, Runir scans all markdown files and generates a search index. This powers the Ctrl/Cmd+K search dialog.

The search index includes:

  • Title from frontmatter
  • Description from frontmatter (or auto-extracted from content)
  • Tags from frontmatter
  • Headings from the document

Adding descriptive tags to your frontmatter significantly improves search accuracy. Use terms your users would search for.