Add markdown download button and make llms.txt available#116
Open
neon60 wants to merge 3 commits into
Open
Conversation
6b884a6 to
d6c6da1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
AI coding assistants and agents increasingly need documentation in machine-readable formats. Two patterns are emerging as standards: per-page Markdown download (so users and agents can copy page content directly into an AI context window) and llms.txt (a combined documentation file that AI agents can discover and ingest). This PR adds both capabilities to make the documentation more accessible to AI-assisted workflows.
Technical Details
Two changes to docs/conf.py:
Enable the theme download button
Sets "use_download_button": True in html_theme_options, which activates the built-in per-page download action provided by rocm_docs_theme. This allows readers to download the current page as Markdown or RST depending on the source format.
Add llms.txt generation
Adds a Sphinx build-finished hook (generate_combined_markdown) that concatenates all Markdown source files into a single llms.txt at the output root. This follows the https://docs.readme.com/main/docs/LLMstxt for AI agent documentation discovery. Files in build, static, template, and VCS directories are excluded. The output is also compatible with the https://docs.readthedocs.com/platform/stable/reference/llms-txt.html.
Note: RST source files are not included in llms.txt at this stage.
Test Plan
Submission Checklist