1

I am looking for a way to rename the title in index.rst.

AutoAPI generates a documentation of modules inside a directory ..\docs\source\_autoapi with index.rst file as follows:

API Reference
=============

This page contains auto-generated API reference documentation [#f1]_.

.. toctree::
   :titlesonly:

   /_autoapi/moduleA/index
   /_autoapi/moduleB/index

.. [#f1] Created with `sphinx-autoapi <https://github.com/readthedocs/sphinx-autoapi>`_

Is there a way to rename the title "API Reference" inside the index.rst file when using AutoAPI?

mzjn
  • 48,958
  • 13
  • 128
  • 248
Azka
  • 21
  • 2
  • https://sphinx-autoapi.readthedocs.io/en/latest/how_to.html#how-to-customise-the-index-page – Steve Piercy Jul 22 '22 at 08:53
  • Found these tutorials pretty nice and had helped a lot. They explain how to manually add and set up Sphink AutoAPI's default template: - [Generating beautiful Python API documentation with Sphinx AutoAPI](https://bylr.info/articles/2022/05/10/api-doc-with-sphinx-autoapi/#setting-up-templates) - [Generating beautiful Python API documentation with Sphinx AutoAPI and Jinja (a template engine) by Antoine Beyeler](https://gdevops.gitlab.io/tuto_documentation/doc_generators/sphinx/contributed_extensions/sphinx_autoapi/antoine_beyler/antoine_beyler.html) – Azka Jul 25 '22 at 13:08

1 Answers1

0

You need to copy the template files and python folder of the official autoapi git located at https://github.com/readthedocs/sphinx-autoapi I place my files/folders in the _templates folder of sphinx. so the folder path would look something like

src/docs/_templates/autoapi/

after this you need to add

autoapi_template_dir = "_templates/autoapi"

to your sphinx conf.py file after the extensions section. Now you can edit the index.rst to fit your needs, in your case you would change API Reference to YOUR TITLE HERE.

T3nt4c135
  • 104
  • 8