From b5078eb7d19c00dcadb80df7e30c8c3f2d65c81e Mon Sep 17 00:00:00 2001 From: Kiss Date: Tue, 11 Aug 2026 14:24:41 +0200 Subject: [PATCH] Generate llms files with rocm_docs_generate_llms Enable llms.txt and llms-full.txt generation from the resolved doctree via rocm_docs_generate_llms, and add the per-page Markdown download button. Bump rocm-docs-core to 1.38.0 with the llms extra. Co-Authored-By: Claude Opus 4 (1M context) --- docs/conf.py | 6 ++++++ docs/sphinx/requirements.in | 2 +- docs/sphinx/requirements.txt | 10 ++++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 16a732c..fe08eb3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -44,6 +44,7 @@ html_theme_options = { "flavor": "amdgpu", "link_main_doc": True, + "use_download_button": True, # Add any additional theme options here } extensions = [ @@ -57,6 +58,11 @@ exclude_patterns = ['.venv'] +# Generate llms.txt and llms-full.txt after each build (the llms.txt standard, +# https://llmstxt.org/). See the rocm-docs-core guide: +# https://rocm.docs.amd.com/projects/rocm-docs-core/en/latest/user_guide/llms.html +rocm_docs_generate_llms = True + # Add the following replacements to every RST file. rst_prolog = f""" .. |rocm_version| replace:: {rocm_version} diff --git a/docs/sphinx/requirements.in b/docs/sphinx/requirements.in index 37497ca..6ef6a9a 100644 --- a/docs/sphinx/requirements.in +++ b/docs/sphinx/requirements.in @@ -1,4 +1,4 @@ -rocm-docs-core==1.35.0 +rocm-docs-core[llms]==1.38.0 sphinx-reredirects sphinxcontrib.datatemplates==0.11.0 Sphinx-Substitution-Extensions==2026.1.12 diff --git a/docs/sphinx/requirements.txt b/docs/sphinx/requirements.txt index 88f21ac..a8d19ac 100644 --- a/docs/sphinx/requirements.txt +++ b/docs/sphinx/requirements.txt @@ -52,6 +52,7 @@ docutils==0.21.2 # myst-parser # pydata-sphinx-theme # sphinx + # sphinx-markdown-builder # sphinx-substitution-extensions exceptiongroup==1.3.0 # via ipython @@ -193,7 +194,7 @@ requests==2.32.5 # via # pygithub # sphinx -rocm-docs-core==1.35.0 +rocm-docs-core[llms]==1.38.0 # via -r requirements.in rpds-py==0.28.0 # via @@ -218,6 +219,7 @@ sphinx==8.1.3 # sphinx-copybutton # sphinx-design # sphinx-external-toc + # sphinx-markdown-builder # sphinx-notfound-page # sphinx-reredirects # sphinx-substitution-extensions @@ -231,6 +233,8 @@ sphinx-design==0.6.1 # via rocm-docs-core sphinx-external-toc==1.0.1 # via rocm-docs-core +sphinx-markdown-builder==0.6.10 + # via rocm-docs-core sphinx-notfound-page==1.1.0 # via rocm-docs-core sphinx-reredirects==0.1.6 @@ -258,7 +262,9 @@ sqlalchemy==2.0.44 stack-data==0.6.3 # via ipython tabulate==0.9.0 - # via jupyter-cache + # via + # jupyter-cache + # sphinx-markdown-builder tomli==2.3.0 # via sphinx tornado==6.5.2