This directory contains the documentation for the rLLM library, built using MkDocs with Material theme and mkdocstrings for API documentation.
To build the documentation:
./build_docs.shTo build and serve the documentation with live reload:
./build_docs.sh serveThe documentation will be available at http://localhost:8000.
docs/
├── mkdocs.yml # MkDocs configuration
├── build_docs.sh # Build script
├── docs/ # Documentation content
│ ├── index.md # Homepage
│ ├── api/ # API documentation (generated)
│ ├── examples/ # Example guides
│ ├── getting-started/ # Getting started guides
│ └── core-concepts/ # Core concept explanations
└── site/ # Generated static site (after build)
- Automatic API docs: Generated from docstrings using mkdocstrings
- Google-style docstrings: Supports Google-style docstring format
- Source code links: Direct links to source code
- Type hints: Shows function signatures and type annotations
- Material Design: Modern, responsive theme
- Code highlighting: Syntax highlighting for multiple languages
- Navigation: Automatic navigation generation
- Search: Full-text search functionality
- Mobile-friendly: Responsive design for all devices
- Create a new
.mdfile in the appropriatedocs/subdirectory - Add the page to the
navsection inmkdocs.yml - Use Markdown syntax for content
API documentation is automatically generated from Python docstrings using mkdocstrings. To document a new module:
- Add a new file in
docs/api/ - Use the mkdocstrings syntax:
::: module.name - Add the page to the navigation in
mkdocs.yml
Example:
# My Module
Brief description of the module.
::: rllm.my_moduleUse fenced code blocks with language specification:
from rllm.agents import Agent
agent = Agent()The Material theme is configured in mkdocs.yml. You can customize:
- Colors and palette
- Navigation features
- Extensions and plugins
Currently enabled extensions:
pymdownx.highlight: Code highlightingpymdownx.superfences: Enhanced code blocksadmonition: Call-out boxespymdownx.details: Collapsible sections
Documentation dependencies are automatically installed with the main package:
mkdocs: Static site generatormkdocs-material: Material Design thememkdocstrings[python]: API documentation from docstringsmkdocs-autorefs: Cross-referencespymdown-extensions: Enhanced Markdown extensions
Import errors when building:
- Ensure the rLLM package is properly installed:
uv pip install -e .. - Check that all dependencies are available
Missing API documentation:
- Verify the module path in the mkdocstrings directive
- Check that the module has proper docstrings
Build fails:
- Check that all dependencies are installed:
uv pip install -e . - Verify that the
mkdocs.ymlsyntax is correct
- Check the MkDocs documentation
- Review mkdocstrings documentation
- Open an issue in the rLLM repository