2

I am building documentation for a project using the Sphinx extension autosummary. I would like to make a very slight change to the default templates that the documentation alludes to. I was able to copy and modify the templates for base.rst, class.rst, and module.rst as they are located in the Sphinx folder.

However, I can't find the templates for function.rst, attribute.rst and method.rst. Where can I find these templates?

Jonathan Lym
  • 113
  • 8
  • 1
    It looks like the templates that you ask about never existed: https://github.com/sphinx-doc/sphinx/commits/master/sphinx/ext/autosummary/templates/autosummary – mzjn Jan 31 '20 at 20:50
  • Interesting. I suppose I'll have to write the rst files from scratch then. Thank you! – Jonathan Lym Jan 31 '20 at 22:49

1 Answers1

1

See the comment at https://github.com/sphinx-doc/sphinx/issues/1879#issuecomment-618529636

Indeed, Sphinx does not have function.rst. But it's not a problem. You can change the template for functions by putting function.rst in your template directory.

If you need an example of the file, please copy base.rst to your local and modify it. Sphinx uses it as a fallback if function.rst not found.

geographika
  • 6,458
  • 4
  • 38
  • 56