File: indices.rst

package info (click to toggle)
pydata-sphinx-theme 0.16.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,088 kB
  • sloc: python: 2,796; javascript: 701; makefile: 42; sh: 12
file content (22 lines) | stat: -rw-r--r-- 992 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
==============
Sphinx indices
==============

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>`__.

Add indices links
=================

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.

.. code-block:: python

    html_theme_options = {
        #[...]
        "primary_sidebar_end": ["indices.html", "sidebar-ethical-ads.html"]
        #[...]
    }

.. note::

    Don't forget to add back the ``"sidebar-ethical-ads.html"`` template if you are serving your documentation using `ReadTheDocs <https://about.readthedocs.com/>`__.