Add docusaurus-plugin-copy-page-button#433
Closed
portdeveloper wants to merge 1 commit into
Closed
Conversation
Author
|
On reflection, I think this overlaps too much with what Fastify already ships — between |
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.
Summary
Adds
docusaurus-plugin-copy-page-buttonto the Fastify website so readers can copy any documentation page as clean markdown — useful when piping plugin docs, hooks, or route options into ChatGPT, Claude, Perplexity, or Gemini.The plugin auto-injects a small "Copy page" button + dropdown into the doc page's table-of-contents area. The dropdown offers:
Live preview of the UI: https://portdeveloper.github.io/copy-page-button-showcase/
Relationship to existing
llms.txtThe website already runs
@signalwire/docusaurus-plugin-llms-txtto generate/llms.txtand/llms-full.txtat build time — great for whole-corpus consumption. This PR doesn't replace or duplicate that. The plugin adds the UI affordance: a reader on a specific page can grab just that page's markdown, or one-click open it in an AI tool, without going through the corpus index.Adoption
The plugin currently ships on docs sites for React Native (just merged via facebook/react-native-website#5085), Puppeteer, Arbitrum, Cardano, Sui, Ethereum execution-apis, and several others — full list in the project README.
Changes
'docusaurus-plugin-copy-page-button'to thepluginsarray indocusaurus.config.jsdocusaurus-plugin-copy-page-button@^0.6.2todependenciespackage-lock.jsonupdatesNotes
package-lock.jsonshows incidental"libc"field removals on a handful of optional native deps. That's npm 10.9.8 (what I ran with) normalizing keys differently from the lockfile's original generator; happy to regenerate with a specific npm version if maintainers want a cleaner diff.scripts/build-website.shlocally — it downloads Fastify release artifacts to generateversions.json. The plugin add is a single string in thepluginsarray, identical to the pattern landed in 4 sibling PRs (Jellyfin, Seeed Studio Wiki, PlayCanvas Developer, Temporal) where the full build was verified.