Repository navigation
v0.12.0
Add API Documentation Support
This release adds comprehensive API documentation support using Griffe for Python code analysis.
New Features
- API Documentation Plugin System: Extensible plugin architecture for generating API docs from source code
- Python Plugin: Extract API documentation from Python packages using Griffe with support for Google, NumPy, and Sphinx docstring styles
- CLI Command:
cross-docs generate-apito generate API documentation JSON - React Components: Full set of components for rendering API docs:
APIPage/APILayout- Main page and layout with separate sidebarModuleDoc/ClassDoc/FunctionDoc- Documentation renderersSignature/Docstring/ParameterTable- Specialized display components
- Sidebar Improvements: Collapsible sections and compact mode for large navigation structures
- Custom Header Support:
APILayoutaccepts custom header/footer components for branding
Configuration
Add to your pyproject.toml:
[[tool.cross-docs.api]]
plugin = "python"
package = "my_package"
prefix = "/api"
docstring_parser = "google"Bug Fixes
- Fixed API navigation URLs to use dotted paths (e.g.,
/api/pkg.moduleinstead of/api/pkg/module/) for cleaner URLs - Fixed prefix calculation for multi-docs API references (e.g.,
/docs/django/api-reference/)