Skip to content

Add docusaurus-plugin-copy-page-button#991

Merged
willeastcott merged 2 commits into
playcanvas:mainfrom
portdeveloper:add-copy-page-button
May 26, 2026
Merged

Add docusaurus-plugin-copy-page-button#991
willeastcott merged 2 commits into
playcanvas:mainfrom
portdeveloper:add-copy-page-button

Conversation

@portdeveloper
Copy link
Copy Markdown
Contributor

Summary

Adds docusaurus-plugin-copy-page-button to the PlayCanvas developer site so readers can copy any documentation page as clean markdown — useful when piping engine/editor docs into ChatGPT, Claude, Perplexity, or Gemini for help with PlayCanvas scripts, scenes, or shader work.

The plugin auto-injects a small "Copy page" button + dropdown into the doc page's table-of-contents area. The dropdown offers:

  • Copy as markdown
  • View as markdown
  • Open in ChatGPT / Claude / Perplexity / Gemini

Live preview of the UI: https://portdeveloper.github.io/copy-page-button-showcase/

Complements existing llms.txt corpus export

The repo already has a custom utils/plugins/docusaurus-plugin-llms.mjs that generates /llms.txt and /llms-full.txt at build time — those are great for whole-corpus consumption. This plugin is the per-page complement: a reader on a specific page can grab just that page's markdown for a focused AI conversation. It doesn't replace or duplicate the existing exports.

Adoption

The plugin currently ships on the 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

  • Added 'docusaurus-plugin-copy-page-button' to the plugins array in docusaurus.config.js
  • Added docusaurus-plugin-copy-page-button@^0.6.2 to dependencies
  • Resulting package-lock.json updates

npm run build passes for both en and ja locales.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the docusaurus-plugin-copy-page-button plugin to the Docusaurus configuration so documentation readers can copy/view the current page as clean markdown (and optionally open it in common AI assistants), complementing the existing whole-corpus llms.txt exports.

Changes:

  • Added docusaurus-plugin-copy-page-button@^0.6.2 to runtime dependencies.
  • Registered docusaurus-plugin-copy-page-button in docusaurus.config.js’s plugins array.
  • Updated package-lock.json to include the new dependency resolution.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
package.json Adds docusaurus-plugin-copy-page-button dependency.
package-lock.json Locks the added plugin version and metadata.
docusaurus.config.js Enables the plugin via the Docusaurus plugins configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@willeastcott willeastcott merged commit 7fa572f into playcanvas:main May 26, 2026
2 of 3 checks passed
@willeastcott
Copy link
Copy Markdown
Contributor

Looks cool - thanks!

portdeveloper added a commit to portdeveloper/docusaurus-plugin-copy-page-button that referenced this pull request May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants