Skip to content

Generate llms files with rocm_docs_generate_llms - #142

Open
neon60 wants to merge 1 commit into
ROCm:mainfrom
neon60:llm_comp_sol
Open

Generate llms files with rocm_docs_generate_llms#142
neon60 wants to merge 1 commit into
ROCm:mainfrom
neon60:llm_comp_sol

Conversation

@neon60

@neon60 neon60 commented Aug 11, 2026

Copy link
Copy Markdown

Motivation

Enable llms.txt / llms-full.txt generation for the AMD Container Toolkit docs, so the site publishes machine-readable documentation following the llms.txt standard (https://llmstxt.org/). This aligns the project with the shared approach used across the Instinct documentation set (k8s-device-plugin, instinct-docs), using the built-in support in rocm-docs-core.

Technical Details

  • Enable generation via rocm_docs_generate_llms = True in docs/conf.py, which produces both llms.txt and llms-full.txt from the resolved doctree at build time.
  • Add use_download_button: True to html_theme_options for the per-page Markdown download button.
  • Bump rocm-docs-core from 1.33.1 to 1.38.0 and add the [llms] extra in docs/sphinx/requirements.in; regenerate requirements.txt (Python 3.10, matching .readthedocs.yaml), which pulls in sphinx-markdown-builder. Existing pins (sphinxcontrib.datatemplates, Sphinx-Substitution-Extensions, sphinx-reredirects) are preserved.

Uses rocm-docs-core 1.38.0 rather than the latest 1.39.0: the published 1.39.0 wheel ships a malformed projects.yaml that breaks the build (already fixed upstream on develop, pending a patch release).

Test Plan

  • Regenerated docs/sphinx/requirements.txt with pip-compile under Python 3.10; confirmed the [llms] extra and all existing dependencies resolve.
  • Ran a full sphinx-build -b html in a clean python:3.10-slim container with the pinned requirements, reproducing the Read the Docs environment.
  • Verified llms.txt and llms-full.txt are generated and inspected their content.

Test Result

Build succeeds (build succeeded, 36 warnings) and logs Wrote llms.txt and llms-full.txt. Generated llms.txt (1.5 KB) indexes all pages; llms-full.txt (94 KB) has correct per-page sections with prose filtering. The 36 warnings are pre-existing intersphinx 404s (unreachable inventory URLs), unrelated to this change.

Submission Checklist

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) <noreply@anthropic.com>
@neon60

neon60 commented Aug 11, 2026

Copy link
Copy Markdown
Author

@neon60

neon60 commented Aug 11, 2026

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant