| 1 |
============== |
| 2 |
Sphinx indices |
| 3 |
============== |
| 4 |
|
| 5 |
Sphinx generates indices named `genindex`, `modindex` and `py-modindex` when building a documentation. More information about them can be found in the `Sphinx documentation for indices <https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-index>`__. |
| 6 |
|
| 7 |
Add indices links |
| 8 |
================= |
| 9 |
|
| 10 |
By design the indices pages are not linked in a documentation generated with this theme. To include them in the primary sidebar of each page, add the following configuration to your ``conf.py`` file in ``html_theme_options`` and the available indices will be display at the bottom. |
| 11 |
|
| 12 |
.. code-block:: python |
| 13 |
|
| 14 |
html_theme_options = { |
| 15 |
#[...] |
| 16 |
"primary_sidebar_end": ["indices.html", "sidebar-ethical-ads.html"] |
| 17 |
#[...] |
| 18 |
} |
| 19 |
|
| 20 |
.. note:: |
| 21 |
|
| 22 |
Don't forget to add back the ``"sidebar-ethical-ads.html"`` template if you are serving your documentation using `ReadTheDocs <https://about.readthedocs.com/>`__. |