I'm using Sphinx to generate docs for a repository. The Sphinx toctree
allows the use of :glob:
to auto-select certain docs.
I have a toctree of the form
.. toctree::
:maxdepth: 1
:glob:
_generated/some/repository/structure/*/doc/acme_corp_*
where the first *
gets all of the different modules located in /some/repository/structure
and I want all the docs from modules that begin with acme_corp_
.
However, this grabs both packages and modules when the toctree outputs. I've tried using _generated/some/repository/structure/*/doc/acme_corp_*package
but that outputs no matching links (since I guess that the word package
does not actually appear in the path).
How can I get Sphinx to auto-generate a maxdepth: 1
toctree
such that I only get the packages in the resulting table of contents?