Skip to content

Commit 0871c7e

Browse files
kartbenhenrikbrixandersen
authored andcommitted
doc: conf.py: fix warnings about docs appearing in index and index-tex
Implement a workaround to ensure only one of the two top-level indexes is included in the documentation build, preventing Sphinx from issuing INFO notices about documents being referenced in both index and index-tex toctrees. Signed-off-by: Benjamin Cabé <[email protected]>
1 parent d6f28bd commit 0871c7e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/conf.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@
114114
else:
115115
exclude_patterns.append("**/*west-not-found*")
116116

117+
# Ensure only one of the two top-level indexes ever gets included.
118+
# This is a workaround for Sphinx issuing INFO notices about being referenced in
119+
# multiple toctrees.
120+
if tags.has("convertimages"): # pylint: disable=undefined-variable # noqa: F821
121+
exclude_patterns.append("index.rst")
122+
else:
123+
exclude_patterns.append("index-tex.rst")
124+
117125
pygments_style = "sphinx"
118126
highlight_language = "none"
119127

0 commit comments

Comments
 (0)