Skip to content

documentation: add copy as markdown button - #1358

Closed
sona-gem wants to merge 2 commits into
amazon-braket:mainfrom
sona-gem:feature/copy-as-markdown
Closed

sona-gem wants to merge 2 commits into
amazon-braket:mainfrom
sona-gem:feature/copy-as-markdown

Conversation

@sona-gem

Copy link
Copy Markdown

Closes #1334

Description of changes:
Added a "Copy as Markdown" button to Amazon Braket documentation pages.

The button converts documentation content into Markdown, including headings,
links, emphasis, lists, inline code, and code blocks and copies the result
to the clipboard.

Testing done:

  • Ran node --check .\doc\_static\copy-markdown.js
  • Ran git diff --check
  • Successfully built the documentation with Sphinx
  • Manually tested the "Copy as Markdown" button on the generated documentation
  • Verified headings, links, lists, inline code, emphasis, and code blocks
    are copied as Markdown

Merge Checklist

General

image

@sona-gem
sona-gem requested a review from a team as a code owner September 26, 2026 10:11
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 26, 2026
@rmshaffer

Copy link
Copy Markdown
Member

@sona-gem thank you for the suggested contribution!

After we looked into this a little more, it turns out that ReadTheDocs already has an agent-friendly solution here. See: https://docs.readthedocs.com/platform/stable/reference/markdown-for-agents.html

tl;dr: ask the agent to use Accept: text/markdown in the requests for the docs pages, and it will come in markdown format automatically. This feature is enabled automatically on all documentation domains hosted on Read the Docs, with no configuration required. So this should work today on https://amazon-braket-sdk-python.readthedocs.io/en/stable/ and the docs sites for our other repos.

As a result, we won't want to add the button to the pages directly. So I'm closing this PR (and the linked issue) as not planned.

@rmshaffer rmshaffer closed this Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a “Copy as Markdown” button to Amazon Braket documentation pages

2 participants