-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Is Your Feature Request Related to a Problem? Please Describe
Currently the mkdocstrings configuration for the MkDocs docs in the template
python-tooling/{{cookiecutter.project_slug}}/mkdocs.yml
Lines 46 to 55 in f1a228d
- mkdocstrings: | |
default_handler: python | |
handlers: | |
python: | |
inventories: | |
- "https://docs.python.org/3/objects.inv" | |
options: | |
docstring_style: google | |
show_submodules: true | |
paths: [src] |
is set up to show submodules on the same page as the parent package, with a single 'API reference' page included in the docs
python-tooling/{{cookiecutter.project_slug}}/docs/api.md
Lines 1 to 3 in f1a228d
# API reference | |
::: {{cookiecutter.package_name}} |
While this works reasonably for small packages, once packages start getting larger it gets cumbersome to have all the API documentation on a single page.
In Sphinx the analagous autodoc plug-in instead defaults to creating a nested directory structure in the built docs reflecting the package structure with one page per submodule and appropriate indices to link all the nav together.
This can be achieved manually in our current set up by setting show_submodules
to False
, creating a Markdown source page for each submodule with the appropriate content, and adding entries to the nav
section for each of the module pages but this is obviously very error prone / likely to end up getting out of sync.
Describe the Solution You'd Like
The mkdocstrings
docs has instructions for setting up a recipe to automate building the appropriate module stub pages using mkdocs_gen_files
plug-in and generating the navigation structure using mkdocs-literate-nav
- ideally we should implement this in the template.
Describe Alternatives You've Considered
No response
Additional Context
No response