Overview
niri’s documentation files are found indocs/wiki/ and should be viewable and browsable in at least three systems:
GitHub Preview
The GitHub repo’s markdown file preview
GitHub Wiki
Documentation Site
The GitHub Wiki
This is generated with thepublish-wiki job in .github/workflows/ci.yml.
The Documentation Site
The documentation site is generated with mkdocs. The configuration files are found indocs/.
To set up and run the documentation site locally, it is recommended to use uv.
Serving the Site Locally with uv
Run mkdocs server
Changes made to the documentation while the development server is running will cause an automatic page refresh in the browser.
Documentation Elements
Elements such as links, admonitions, images, and snippets should work as expected in markdown file previews on GitHub, the GitHub repo’s wiki, and in the documentation site.Links
Link guidelines
Links should in all cases be relative (e.g.
./FAQ.md), unless it’s an external one.Links should have anchors if they are meant to lead the user to a specific section on a page (e.g. ./Getting-Started.md#nvidia).Admonitions
This is an important distinction from other
mkdocs-based documentation you might have encountered.Admonitions, or alerts should be written the way GitHub defines them.- NOTE
- TIP
- IMPORTANT
- WARNING
- CAUTION
Images
Images should have relative links to resources indocs/wiki/img/, and should contain sensible alt-text.
Videos
For compatibility with both mkdocs and GitHub Wiki, videos need to be wrapped in a<video> tag (displayed by mkdocs) and have the video link again as fallback text (displayed by GitHub Wiki) padded with blank lines.
Snippets
Configuration and code snippets in general should be annotated with a language.- KDL Config
- Bash/Shell
- Rust
If the language used in the snippet is KDL, open the code block like this:
Best Practices
Test your documentation locally
Test your documentation locally
Always run
mkdocs serve locally to verify that:- All links work correctly
- Images display properly
- Admonitions render as expected
- No build errors occur
Use relative links
Use relative links
Always use relative links for internal documentation references.This ensures links work correctly across all three viewing platforms (GitHub preview, wiki, and docs site).
Include alt text for images
Include alt text for images
Always provide meaningful alt text for images to improve accessibility and help users understand content when images don’t load.
Annotate code blocks
Annotate code blocks
Always specify the language for code blocks to enable proper syntax highlighting across all platforms.
Contributing Documentation
When contributing documentation changes, make sure to:
- Follow the link and admonition guidelines above
- Test locally with
mkdocs serve - Verify the documentation works on all three platforms
- Use proper markdown formatting for code, images, and videos
For more information on contributing to niri, see the CONTRIBUTING.md file.