executablebooks / sphinx-external-toc

A sphinx extension that allows the site-map to be defined in a single YAML file
https://sphinx-external-toc.readthedocs.io
MIT License
33 stars 18 forks source link

Specifically handle apidoc generated files #36

Open chrisjsewell opened 3 years ago

chrisjsewell commented 3 years ago

files generated with sphinx-autodoc will inherently contain toctree directives, and so sphinx_external_toc will warn e.g.: apidoc/my_package.rst:7: WARNING: toctree directive not expected with external-toc [etoc.toctree]

You can currently work around this by including:

suppress_warnings = ["etoc.toctree"]

but that will then ignore any legitimate issues

so it would nice to be able to "mark" a file as "it is ok for this file and its children to contain toctree"

mikofski commented 1 year ago

FYI: this issue "toctree directive not expected with external-toc" also pops up using sphinx-tags