Skip to content

docs: add docusaurus-plugin-copy-page-button#1736

Closed
portdeveloper wants to merge 1 commit into
oasisprotocol:mainfrom
portdeveloper:add-docusaurus-copy-page-button
Closed

docs: add docusaurus-plugin-copy-page-button#1736
portdeveloper wants to merge 1 commit into
oasisprotocol:mainfrom
portdeveloper:add-docusaurus-copy-page-button

Conversation

@portdeveloper
Copy link
Copy Markdown

@portdeveloper portdeveloper commented May 21, 2026

Summary

  • add docusaurus-plugin-copy-page-button to the docs dependencies
  • register the plugin in docusaurus.config.ts

Why

Oasis docs include protocol, SDK, and developer reference pages that are useful to bring into AI tools. This adds a page-level copy/open button that exports the current page as clean markdown and includes one-click Open in ChatGPT, Claude, and Gemini actions.

I checked the repo for overlapping features before opening this. Oasis already has llms.txt, llms-full.txt, and Context7 MCP documentation for corpus-level AI ingestion. This PR is different: it adds a page-level UI action for copying or opening the current page directly from the docs page.

The plugin has no runtime dependencies and uses peer dependencies for Docusaurus and React.

Validation

  • git diff --check
  • package manifest, lockfile, and config sanity check

Not run locally: full docs build, due the dependency install/build footprint in this environment.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 21, 2026

Deploy Preview for oasisprotocol-docs ready!

Name Link
🔨 Latest commit 7f9b03d
🔍 Latest deploy log https://app.netlify.com/projects/oasisprotocol-docs/deploys/6a0f670040fe2f000876f94f
😎 Deploy Preview https://deploy-preview-1736--oasisprotocol-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@uniyalabhishek uniyalabhishek requested a review from matevz May 22, 2026 08:04
Copy link
Copy Markdown
Member

@matevz matevz left a comment

Choose a reason for hiding this comment

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

  1. This seems like duplicated functionality of llms.txt implemented in #1626 and #1673. For every documentation page you can already get its markdown source by simply appending .md at the end of the url. It would be better if we didn't rely on external npm package for this and just wrap the existing markdown code in form of a Copy page button.

  2. There is a bug when clicking on a link that includes an anchor, for example https://deploy-preview-1736--oasisprotocol-docs.netlify.app/build/rofl/quickstart#prerequisites
    , then the button is not visible.

  3. The button does not appear in no-javascript environment (not critical, but would be nice to have at least a link to markdown source).

@portdeveloper
Copy link
Copy Markdown
Author

Thanks for the review. Given the existing per-page Markdown support and the preference to avoid an external package for this UI, I’ll close this PR rather than push the package approach further. The anchor-link/no-JS notes are useful feedback; I’ll keep them in mind for the plugin and for any future custom implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants