docs: Include module indices only when building standalone package doc

In order to remove warnings about /apidoc/*.rst files being included
multiple times in toc when building full swh documentation, prefer to
include module indices only when building standalone package documentation.

Also include them the proper sphinx way.

Related to T4496
This commit is contained in:
Antoine Lambert 2022-12-19 13:46:43 +01:00
parent b3b5639e9a
commit 4cec345028

View file

@ -29,4 +29,12 @@ Reference Documentation
:maxdepth: 2
cli
/apidoc/swh.lister
.. only:: standalone_package_doc
Indices and tables
------------------
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`