Skip to content

Commit 16dc882

Browse files
authored
limit llms.txt generation to only build on readthedocs (#7116)
1 parent f5b2255 commit 16dc882

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

docs/src/conf.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ def _dotv(version):
167167
"sphinx_copybutton",
168168
"sphinx_design",
169169
"sphinx_gallery.gen_gallery",
170-
"sphinx_llm.txt",
171170
"sphinx_needs",
172171
"sphinx_reredirects",
173172
"user_manual_directives",
@@ -181,11 +180,16 @@ def _dotv(version):
181180

182181
# -- sphinx-llm ---------------------------------------------------------------
183182
# See https://github.com/NVIDIA/sphinx-llm
184-
llms_txt_enabled = True
185-
llms_txt_build_parallel = True
186-
llms_txt_suffix_mode = "auto"
187-
llms_txt_full_build = True
188-
llms_txt_description = "A powerful, format-agnostic, community-driven Python package for analysing and visualising Earth science data"
183+
184+
if on_rtd:
185+
autolog("[READTHEDOCS] [sphinx_llm.txt] Loading extension and configuring.")
186+
extensions.append("sphinx_llm.txt")
187+
188+
llms_txt_enabled = True
189+
llms_txt_build_parallel = True
190+
llms_txt_suffix_mode = "auto"
191+
llms_txt_full_build = True
192+
llms_txt_description = "A powerful, format-agnostic, community-driven Python package for analysing and visualising Earth science data"
189193

190194
# -- Napoleon extension -------------------------------------------------------
191195
# See https://sphinxcontrib-napoleon.readthedocs.io/en/latest/sphinxcontrib.napoleon.html

0 commit comments

Comments
 (0)