Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Exclude news and contributing from llms-full.txt only (#8119)

Adrian6995549c4646
diff --git a/docs/conf.py b/docs/conf.py
index 33966ed95..f2f0c2ce8 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -185,16 +185,15 @@ llms_txt_exclude = [
]
-def _exclude_llms_txt_docs_from_markdown_builds(app):
- builder_name = getattr(getattr(app, "builder", None), "name", None)
- if "markdown" not in builder_name:
+def _exclude_llms_txt_docs_from_llms_full_txt(app):
+ # llms-full.txt is the output of the singlemarkdown builder.
+ if app.builder.name != "singlemarkdown":
return
- for pattern in llms_txt_exclude:
- app.config.exclude_patterns.append(pattern)
+ app.config.exclude_patterns.extend(llms_txt_exclude)
def setup(app):
- app.connect("builder-inited", _exclude_llms_txt_docs_from_markdown_builds)
+ app.connect("builder-inited", _exclude_llms_txt_docs_from_llms_full_txt)
# -- Other options ------------------------------------------------------------