Skip to content

Commit 88f72a0

Browse files
kwagyemanclaude
andcommitted
docs: gate sphinx_llms_txt behind OPENMV_DOCS_EMIT_LLMS
The llms.txt / llms-full.txt dump is English source regardless of build language, so emitting it in all 26 per-language builds duplicates ~5 MB x26. Load the extension only when OPENMV_DOCS_EMIT_LLMS is set; CI sets it on the English channel-root build only. Unset locally; set it to regenerate dumps. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent e233ece commit 88f72a0

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

docs/conf.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,18 @@ def _render_landing_code(src):
300300
"sphinx.ext.mathjax",
301301
"sphinx.ext.todo",
302302
"sphinx.ext.coverage",
303-
# Auto-generates /llms.txt + /llms-full.txt during the build so LLMs
304-
# can discover and ingest the docs without any per-page maintenance.
305-
"sphinx_llms_txt",
306303
]
307304

305+
# Auto-generates /llms.txt + /llms-full.txt during the build so LLMs can
306+
# discover and ingest the docs without any per-page maintenance. The dump is
307+
# English source regardless of build language, so emitting it in every one of
308+
# the 26 per-language builds just duplicates ~5 MB x26. Gate it to the English
309+
# (channel-root) build only: CI sets OPENMV_DOCS_EMIT_LLMS=1 on that step and
310+
# leaves it unset for the per-language builds. Unset locally too, so set it if
311+
# you want to regenerate the dumps from a local English build.
312+
if os.environ.get("OPENMV_DOCS_EMIT_LLMS"):
313+
extensions.append("sphinx_llms_txt")
314+
308315
# Add any paths that contain templates here, relative to this directory.
309316
templates_path = ["templates"]
310317

0 commit comments

Comments
 (0)