-
M. Eric Irrgang authored
The `only::` and `ifconfig::` blocks (any blocks, actually) are explicitly not intended for altering doctree structure. Putting structural details in blocks can cause unexpected and erroneous behavior across sphinx versions or themes, as it breaks the underlying document builder API. This change uses builder-specific configuration elements to direct (2) different root doctree entry points, where appropriate. To avoid extra processing (and warnings about orphaned docs), the unused root document is excluded from processing in builds where it is not used. Similarly, unused configuration entries are excluded from processing in builds for which they are not needed. E.g. we do not define the `latex_documents` when we are not building them so that we do not get errors about references to the latex root document (texindex.rst), which we have excluded from processing. We use globbing in `toctree` directives to allow exclusion of paths that are not considered due to `exclude_patterns`.
876a35a0
Loading