I have started documenting a Python project using Sphinx. It is the first time I use it - I am used to tools which work with a JavaDoc-like syntax, and I have some doubts.
Since I want the documentation to appear near the code, I make use of the .. automodule::
, .. autoclass::
and .. automethod::
directives. So the structure of my documentation is as follows: index.rst
contains the TOC and
.. automodule:: my_main_package
and then the top-level __init__.py
contains directives like
.. automodule:: some_subpackage
for each subpackage and so on. Finally each module contains directives
.. autoclass:: some_class
:members:
for each class in the module.
This mostly works, but what I get is a single page documentation, which is a little odd to work with.
How should I organize my documentation in order to obtain a tree of hyperlinked files? That is, the main package should contain its own documentation and links to each of its subpackages and so on, until each module has its own page.