I have decided to use autosummary
to create documentation of my module. In index.rst
I have "imported" all relevant modules and submodules that I want documentation on. The modules are documented as expected, but one thing bothers me. The module paths are rather long, and they look repulsive in the toctree next to the documentation.
index.rst
Documentation
*************
Documentation of things.
.. toctree::
.. autosummary::
:toctree: _autosummary
module
module.submodule
module.submodule.sub
module.long_submodule.sub_1
module.long_submodule.sub_2
module.long_submodule.sub_3
module.long_submodule.sub_4
conf.py
project = 'Name'
author = 'Me'
version = '0.7'
extensions = ['sphinx.ext.autodoc', 'sphinxcontrib.fulltoc', 'sphinx.ext.autosummary']
templates_path = ['_templates']
autosummary_generate = True
master_doc = 'index'
Is there a way to rename the entries in the navigation bar, preferably in index.rst
? I would also be willing to consider changing the approach from autosummary
to some other system if that accomplishes the task.
I have also used a custom template for the modules named _templates/autosummary/module.rst
. Its contents are as follows:
{{ fullname }}
{{ underline }}
.. automodule:: {{ fullname }}
:members:
:undoc-members:
:show-inheritance: