Configuration
Configure site metadata, paths, navigation, branding, API docs, and theme settings.
Static Docs reads site.toml. Paths are resolved relative to the config file.
Minimal config
title = "My Docs"
tagline = "Python documentation without a frontend build step"
description = "Documentation for my project."
site_url = "https://example.com/docs"
base_url = "/docs/"
content_dir = "content"
output_dir = "dist"
nav_file = "navigation.yml"
[brand]
name = "My Project"
accent = "#f46e00"
[links]
github = "https://github.com/acme/my-project"
[repo]
url = "https://github.com/acme/my-project"
branch = "main"
docs_dir = "docs/content"
[theme]
name = "static-docs"
Site fields
| Parameter | Type | Status | Description |
|---|---|---|---|
title | string | Required | Site title used in metadata and page chrome. |
tagline | string | Optional | Short supporting text used by some pages and metadata. |
description | string | Optional | Fallback meta description when a page does not define its own. |
content_dir | path | Required | Directory containing Markdown source pages. |
output_dir | path | Required | Directory where Static Docs writes HTML and assets. |
nav_file | path | Optional | YAML file used for sidebar, top nav, GitHub link, and feedback link. |
site_url | URL | Optional | Public production URL used for canonical URLs, sitemap.xml, and robots.txt. |
base_url | path or URL | Optional | Base path used by generated links and assets. |
Edit links
Use [repo] to show an "Edit this page on GitHub" link in the right-side panel.
[repo]
url = "https://github.com/acme/my-project"
branch = "main"
docs_dir = "docs/content"
| Parameter | Type | Status | Description |
|---|---|---|---|
url | URL | Optional | Repository URL used to build edit links. |
branch | string | Optional | Branch used in GitHub edit URLs. Defaults to main. |
docs_dir | path | Optional | Path from the repository root to the Markdown content directory. |
Navigation
Navigation lives in navigation.yml by default.
- title: Overview
page: index.md
- title: Guides
items:
- page: getting-started.md
- page: configuration.md
- navigation-bar:
github:
title: GitHub
link: https://github.com/acme/my-project
logo: https://github.githubassets.com/favicons/favicon.svg
resources:
title: Resources
items:
- name: PyPI
link: https://pypi.org/project/static-docs/
- issues:
title: Issues
link: https://github.com/acme/my-project/issues
Each sidebar item supports title, page, url, items, and order.
Navigation result
- Sidebar entries come from
title,page, and nesteditems. - Top navigation entries come from
navigation-bar. - The GitHub icon comes from
navigation-bar.github. - The right-side feedback link comes from
issues.link.
Page metadata
Page-level metadata belongs in Markdown front matter. Use it for titles, sidebar labels, descriptions, badges, page status, drafts, and per-page layout options.
See Authoring for the full front matter reference.
Theme overrides
The built-in theme is static-docs and requires no local files:
[theme]
name = "static-docs"
To add project-specific CSS, JavaScript, or templates, point theme.dir at a local directory:
[theme]
name = "static-docs"
dir = "theme"
When dir is set, Static Docs will:
- copy
theme/assets/*intodist/assets/ - load
theme/assets/custom.cssafter the built-in stylesheet when it exists - load
theme/assets/custom.jsafter the built-in script when it exists - use
theme/templates/page.htmlas the default outer HTML shell when it exists - use
template: <name>.htmlfront matter to select another template fromtheme/templates/