Search code examples
pythonpython-sphinxautodoc

How do I stop the "Index" and "Python Module Index" from appearing using sphinx autodoc?


I'm using sphinx autodoc for retrieving class and module docstrings.

When I use autodoc sphinx automatically generates an ugly page called Python Module Index.

I can only disable this page if I add :noindex: to every single autoclass and automodule.

Question: Is there a way to globally insert :noindex into these ReStructured Text directives?


My index.rst for reference:

.. toctree::
   :maxdepth: 5
   :glob:

   README
   CHANGELOG
   DEV-README

Solution

  • You should be able to remove this under index.rst. See if there is a line:

    * :ref:`modindex`