Saturday 27 August 2022

Controlling where sphinx generated .rst files are saved

Suppose the following documentation structure for sphinx:

doc
 |_ _static
 |_ _templates
 |_ api
     |_ index.rst
     |_ classes.rst
     |_ functions.rst
 |_ index.rst
 |_ more_functions.rst
 |_ conf.py

And that classes.rst, functions.rst and more_functions.rst have classes and functions to auto-document with autodoc/autosummary. The build will generate .rst files for those classes and functions in:

  • doc/generated for more_functions.rst
  • doc/api/generated for classes.rst and functions.rst

Is there a way to control where those generated folders are created?


I'm trying to get a unique generated folder in the end. In this case, with this structure:

doc
 |_ generated
     |_ generated-from-more-functions.rst
     |_ api
         |_ generated-from-api/classes.rst
         |_ generated-from-api/functions-rst


from Controlling where sphinx generated .rst files are saved

No comments:

Post a Comment