add docusaurus-plugin-copy-page-button#5085
Conversation
|
@portdeveloper is attempting to deploy a commit to the Meta Open Source Team on Vercel. A member of the Team first needs to authorize it. |
✅ Deploy Preview for react-native ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hey @portdeveloper, thanks for working on this addition! 👍 Some feedback:
If required, feel free to swizzle some components. |
- no-ToC fallback now inserts the button inline after the breadcrumbs (was: position: fixed in the top-right viewport corner) - reserve min-height: 56px on the sidebar-mode container so the button slot is sized before React mounts (reduces layout shift on first paint) - inherit --ifm-font-family-base on the button and dropdown items (was: browser default button font) - replace the setTimeout polling loop with a MutationObserver on document.body that fires the moment the ToC or article mounts; periodic check kept as a safety net
includes fixes for @Simek's feedback (no-ToC fallback, layout shift, font, first-render race)
|
thanks for the detailed feedback @Simek — really useful. shipped 0.5.2 with fixes for all four:
just bumped the PR to (also FYI the changelog entry credits your feedback by name + links back here — feel free to push back if you'd rather not be cited.) |

adds docusaurus-plugin-copy-page-button to dependencies + plugins array
since the rn docs site is basically the canonical docusaurus showcase, figured this might be worth dogfooding — it puts a "Copy page" button in the sidebar that exports the current page as clean markdown, plus one-click "Open in Claude / ChatGPT / Gemini" actions that prefill the markdown.
typical rn scenario this helps with: someone's on a specific component or API ref page and wants to drop it into an LLM to ask "how do I use this with [X library]" — instead of selecting around the page chrome or digging into the repo for the right .md file.
auto-injects into the TOC sidebar, theme-aware, no extra config.
shipping on Ethereum execution-apis, Sui, Walrus, Seal, SuiNS, Monad, Flare, Kaia, Nillion, Chronicle, Cardano and Arbitrum docs. listed in the Docusaurus community plugins page.
repo: https://github.com/portdeveloper/docusaurus-plugin-copy-page-button
npm: https://www.npmjs.com/package/docusaurus-plugin-copy-page-button (~10k installs/month)
demo: https://portdeveloper.github.io/copy-page-button-showcase/
happy to revert if it's not a fit