Skip to content

Add markdown download button and make llms.txt available#116

Open
neon60 wants to merge 3 commits into
developfrom
makrdown_download
Open

Add markdown download button and make llms.txt available#116
neon60 wants to merge 3 commits into
developfrom
makrdown_download

Conversation

@neon60
Copy link
Copy Markdown

@neon60 neon60 commented Apr 28, 2026

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

  • Verify the download button appears on documentation pages
  • Verify llms.txt available for the project.
  • Confirm excluded directories (.git, _build, _static, _templates, .venv) are not represented in llms.txt

Submission Checklist

@neon60 neon60 changed the title Add markdown download button POC: Add markdown download button - DO NOT MERGE Apr 28, 2026
@neon60 neon60 force-pushed the makrdown_download branch from 6b884a6 to d6c6da1 Compare April 28, 2026 13:56
@neon60 neon60 changed the title POC: Add markdown download button - DO NOT MERGE Add markdown download button and make llms.txt available May 13, 2026
@neon60 neon60 marked this pull request as ready for review May 13, 2026 13:17
@neon60 neon60 requested a review from marco-grond as a code owner May 13, 2026 13:17
@neon60 neon60 force-pushed the makrdown_download branch from 9905b85 to 1231e13 Compare May 15, 2026 11:39
@neon60 neon60 force-pushed the makrdown_download branch from 1231e13 to 45ca7f3 Compare May 15, 2026 11:43
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