Skip to content

Commit 4de1a2d

Browse files
kwagyemanclaude
andcommitted
docs: rename llms gate to OPENMV_DOCS_ROOT_BUILD; clarify _sources stays
The root-build env var now reads OPENMV_DOCS_ROOT_BUILD (it marks the single English channel-root build that owns root-only artifacts). Only llms.txt / llms-full.txt is gated on it -- documented why _sources/ is NOT: the Shibuya "Copy page / Open in ChatGPT" dropdown only renders source links when html_copy_source is on, so every build keeps it and the per-language _sources copies are removed post-build by .ci/dedup_assets.py instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 88f72a0 commit 4de1a2d

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

docs/conf.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -302,14 +302,20 @@ def _render_landing_code(src):
302302
"sphinx.ext.coverage",
303303
]
304304

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"):
305+
# llms.txt / llms-full.txt is English source regardless of build language and
306+
# only belongs at the channel root, so emitting it in all 26 per-language builds
307+
# just duplicates ~5 MB x26. CI sets OPENMV_DOCS_ROOT_BUILD=1 on the single
308+
# English (channel-root) build and leaves it unset for the per-language builds,
309+
# which then skip the extension entirely -- no duplicates to clean up. Set it
310+
# locally to regenerate the dumps from a local English build.
311+
#
312+
# NOTE: _sources/ is deliberately NOT gated this way. The Shibuya "Copy page /
313+
# Open in ChatGPT" dropdown only renders its source links when html_copy_source
314+
# is on, so every build must keep it (default True). The per-language _sources
315+
# copies are byte-identical to the root and never referenced locally (the
316+
# dropdown uses an absolute channel-root URL via the channel-aware html_baseurl),
317+
# so they are removed after the build by .ci/dedup_assets.py instead.
318+
if os.environ.get("OPENMV_DOCS_ROOT_BUILD"):
313319
extensions.append("sphinx_llms_txt")
314320

315321
# Add any paths that contain templates here, relative to this directory.

0 commit comments

Comments
 (0)