Can't get local sphinx-apidoc templates to work

788 Views Asked by At

Re: Using sphinx-apidoc to automatically generate API reference from docstrings via the autodoc extension...

I copied the global /site-packages/sphinx/templates/apidoc/package.rst_t template to a local folder, and made a nonsense edit. When I built the API docs, the nonsense edit wasn't visible ie. the local templates didn't seem to override the global ones.

Here's my local docs/source directory:

|_ docs
   |_ source
      |_ templates
      |    package.rst_t
      |_ conf.py
      |_ index.rst

conf.py contains this directive:

templates_path = ['templates']

I built the API docs using this command:

sphinx-apidoc -e -M -f --templatedir=./templates -o ./source/autodoc ../myproject

Can anyone see what's going wrong?

0

There are 0 best solutions below