GitHub

Write Markdown pages with frontmatter, headings, code blocks, Mermaid diagrams, and page-level options.

Page frontmatter

Add YAML frontmatter at the top of any Markdown page:

yaml
---
title: Components
description: Built-in documentation components.
nav_title: Components
badge: Guide
status: beta
hide_toc: false
hide_sidebar: false
order: 3
draft: false
---

You get:

GuideBeta
ParameterTypeStatusDescription
titlestringOptionalPage title and browser title.
descriptionstringOptionalMeta description, page summary, search text, and OpenGraph description.
nav_titlestringOptionalOptional shorter label for sidebar navigation.
badgestringOptionalSmall badge shown beside the page title.
statusnew | beta | deprecatedOptionalStatus pill shown beside the page title.
hide_tocbooleanOptionalHide the right-side table of contents.
hide_sidebarbooleanOptionalHide the left sidebar on a page.
draftbooleanOptionalExclude the page from the build.

Headings

Markdown headings create:

  • anchor links
  • right-side table of contents entries
  • search index heading results

Hover over a heading and click the anchor icon to copy a section link.

Code blocks

Write:

md
```python title="hello.py" hl_lines="2"
def hello(name: str) -> str:
    return f"Hello {name}"
```

You get syntax highlighting, an optional file title, highlighted lines, and a copy button.

pythonhello.py
def hello(name: str) -> str:
    return f"Hello {name}"

Images

Reference local images with standard Markdown. Static Docs copies local image files next to the generated page output.

md
![Architecture diagram](images/architecture.png)

External image URLs are left unchanged.

Mermaid

Write:

md
```mermaid
graph TD;
  A[Write Markdown] --> B[Build Static Docs]
  B --> C[Deploy HTML]
```

You get:

graph TD; A[Write Markdown] --> B[Build Static Docs] B --> C[Deploy HTML]