Documentation guide¶
Documentation lives under docs/ and is built with MkDocs.
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:
python -m pip install -r docs/requirements.txt
Run locally:
./gradlew docsServe
Or run MkDocs directly (without regenerating Dokka output):
mkdocs serve
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:
!!! note Important information here. !!! warning Potential issues to be aware of. !!! tip Helpful hints for users. - 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:
getting-started.md # correct
GettingStarted.md # incorrect
getting_started.md # incorrect
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