Repository navigation
Copy page button - #1134
Open
brandonleekramer wants to merge 3 commits into
Open
Copy page button#1134brandonleekramer wants to merge 3 commits into
brandonleekramer wants to merge 3 commits into
Conversation
Reworks #1089 to use ExperimentalCopyButton. Co-authored-by: PaulieB14 <barba334@gmail.com>
Co-authored-by: PaulieB14 <barba334@gmail.com>
itsjerryokolo
approved these changes
Nov 21, 2026
itsjerryokolo
left a comment
Contributor
There was a problem hiding this comment.
Verified that Copy page picks up the new page after navigation. All four checks passed. Looks good to me.
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.
Adds a Copy page button to the top of every docs page. It copies the page as Markdown so readers can paste it into an LLM. This reworks #1089 by @PaulieB14 to use the Graph Design System (GDS) and fix bugs found in review. PaulieB14 is credited as co-author on both commits.
Supersedes #1089.
What it does
Source:line with the page's URL.importlines are removed. Lines inside code blocks are kept.global.page.copy,global.page.copiedandglobal.page.copyFailedinen/global.json.Changes from #1089
ExperimentalButton,Tooltipand theCopyInteractiveicon in@edgeandnode/gds, the version the site already uses. This replaces raw<button>s, a hand-built dropdown, inline SVG icons and one-off Tailwind classes.ExperimentalCopyButtonisn't used directly because it shows "Copied" before an async copy finishes, so it can't report a failure.@edgeandnode/gdsv6 has no dropdown menu with a trigger.import, including inside code blocks. 8 pages lost example code this way, including 21 lines ongraph-ts/api.mdx./tree/, which feat: add "Copy page" button for LLMs #1089 turned into a 404 address. On the graph-ts changelog, it copied the 404 page and still said "Copied!".ClipboardItem. Other browsers fall back towriteText.content.tsxare left out.Files
website/src/components/CopyPageButton.tsx: the new component.website/src/components/index.ts: exports it.website/src/layout/templates/default/content.tsx: adds the button to the page header.website/src/pages/en/global.json: the three labels.Testing done
tsc,eslint --max-warnings 0andprettier --checkpass.