Documentation Guide¶
This guide explains how to write and maintain documentation for the TilekarOS project.
1. Structure¶
Documentation is organized into logical sections:
getting-started/: Installation, building, and running.kernel/: Core internals (memory, tasks, interrupts).drivers/: Hardware-specific implementation details.api/: Programmer-facing system calls and LibC reference.development/: Coding standards and contribution guides.
2. Mermaid Diagrams¶
TilekarOS uses Mermaid.js for architectural diagrams. This allows us to keep diagrams in version control as text.
Example:¶
graph LR
A[Source] --> B(Compile)
B --> C{Link}
C --> D[Binary]
Tips for Mermaid:¶
- Use
stateDiagram-v2for state machines. - Use
block-betafor memory layouts. - Use
classDiagramfor data structures (TCB, VNode, etc.).
3. Snippets (Including External Code)¶
To include code from outside the docs/ folder, use the pymdownx.snippets syntax. The base path is set to the project root.
Usage:¶
4. Writing Style¶
- Be Concise: Use high-signal language. Avoid fluff.
- Code Blocks: Always specify the language (e.g.,
c`,asm, ````mermaid). - Headings: Use hierarchical headings (
#,##,###). - Admonitions: Use
!!! info,!!! tip,!!! dangerto highlight important information.
5. How to Contribute¶
We welcome documentation improvements!
- Find a Gap: Look for missing explanations, unclear diagrams, or outdated examples.
- Edit Markdown: Modify the files in the
docs/directory. - Preview: Run
mkdocs serveto see your changes locally. - Submit: Create a Pull Request with your improvements.
6. Previewing Docs¶
TilekarOS uses MkDocs with the Material theme.
- Install dependencies:
- Serve the docs locally:
- Open
http://127.0.0.1:8000in your browser.