Documentation guide¶
Documentation lives under docs/ and is built with MkDocs.
Frontmatter requirements¶
All documentation pages that are part of the MkDocs site (listed in mkdocs.yml under nav:) must include YAML frontmatter with a description field. The description is used to populate DOCS_MAP.md and helps readers understand the page's purpose.
Markdown snippets under docs/includes/ are auto-included via pymdownx.snippets and should not have frontmatter (for example, docs/includes/abbreviations.md).
---
description: Concise description of page content and purpose. Can be up to 4 sentences providing context for what the reader will learn.
---
# Page Title
Content starts here...
The sync_docs_map.py script extracts descriptions from frontmatter to populate DOCS_MAP.md. Pages without descriptions show [Description needed].
python3 skills/project-docs/scripts/sync_docs_map.py --check
python3 skills/project-docs/scripts/sync_docs_map.py
Principles¶
- Write for the audience (Getting started vs How-to vs Concepts vs Reference).
- Keep examples copy-pastable and aligned with actual code. If code changes, update docs in the same PR.
- Prefer links to reference docs instead of duplicating normative details.
Local preview¶
Install Python deps:
Run locally:
Or run MkDocs directly (without regenerating Dokka output):
Contribution workflow¶
- Create or edit docs under
docs/following the Diataxis structure: getting-started/: Tutorials and quick start guideshow-to/: Task-oriented guides for specific goalsconcepts/: Explanatory content for understandingreference/: API and SPI documentation for lookup-
modules/: Per-module technical documentation -
Preview locally with
./gradlew docsServeormkdocs serve -
Update navigation in
mkdocs.ymlif adding new pages -
Cross-reference related docs instead of duplicating content
-
Verify code examples compile and run correctly
Style guidelines¶
- Use active voice: "Configure the client" not "The client can be configured"
- Include runnable code examples for every feature when possible
- Use admonitions for callouts:
- Link to Dokka API docs for class references using relative paths
- Follow existing voice in neighboring documents for consistency
- Keep headings hierarchical:
#for title,##for sections,###for subsections
File naming¶
Use lowercase with hyphens:
Adding new pages¶
- Create the markdown file in the appropriate directory
- Add the page to
mkdocs.ymlundernav: - Add cross-references from related pages
- Verify navigation with
mkdocs serve