Skip to content

site3: add docusaurus-plugin-copy-page-button#4761

Open
portdeveloper wants to merge 2 commits into
apache:masterfrom
portdeveloper:add-copy-page-button-plugin
Open

site3: add docusaurus-plugin-copy-page-button#4761
portdeveloper wants to merge 2 commits into
apache:masterfrom
portdeveloper:add-copy-page-button-plugin

Conversation

@portdeveloper
Copy link
Copy Markdown

What this adds

A "Copy page" button in the docs sidebar that exports the current Apache BookKeeper docs page as clean markdown, with one-click "Open in ChatGPT", "Open in Claude", and "Open in Gemini" actions.

Why for BookKeeper

BookKeeper is the kind of distributed systems codebase that devs ask AI assistants about constantly: protocol details, configuration tuning, deployment patterns, and the various API surface for the client SDKs. A one-click handoff from any docs page into Claude or ChatGPT removes the friction of "select all, strip out the nav, paste."

The plugin auto-injects into the table-of-contents sidebar — no further config needed and no new build step.

Production users

The plugin is currently shipping on Ethereum execution-apis, Sui (Mysten Labs), Walrus, Seal, SuiNS, Monad, Flare, Kaia, Nillion, Chronicle, Cardano, Kurtosis, and Dagger docs. ~10k npm installs/month.

Changes

  • Adds docusaurus-plugin-copy-page-button to site3/website/package.json dependencies
  • Adds the plugin string to the existing plugins array in site3/website/docusaurus.config.js

Links

Happy to revert or adjust if this doesn't fit the project's direction.

Adds a 'Copy page' button to the docs sidebar that exports the page as
clean markdown for use with ChatGPT, Claude, and Gemini.
@portdeveloper
Copy link
Copy Markdown
Author

Friendly bump — happy to revise, rebase, or close this if it's not a fit for your project.

Quick update since I opened it: Cardano docs shipped the plugin (merged in input-output-hk/cardano-documentation#739), so it's now running in production on Ethereum execution-apis, Sui (Mysten Labs), Walrus, Seal, SuiNS, Monad, Flare, Kaia, Nillion, Chronicle, and Cardano. Also now listed in the official Docusaurus community plugins.

No worries if this isn't on your roadmap — just want to make sure it didn't slip through the cracks.

@portdeveloper
Copy link
Copy Markdown
Author

fyi shipped 0.5.2 today and pushed the version bump (^0.4.2 → ^0.5.2) on this branch.

the most relevant fix: the button now renders on pages without a ToC. previously the fallback was a fixed-position overlay in the top-right viewport corner which often got hidden behind navbars — easy to miss when reviewing a landing/index page. now it injects inline after the breadcrumbs.

also in 0.5.2: button + dropdown inherit --ifm-font-family-base (was browser default), min-height reserved on the container to reduce layout shift, and a MutationObserver replaces the chained setTimeout polling so the button shows up reliably on first render.

all credit to @Simek who reviewed facebook/react-native-website#5085 and flagged these.

happy to close this out if not a fit — just wanted to flag the fixes in case the no-ToC behavior was a blocker.

Copy link
Copy Markdown

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

This PR adds a third-party Docusaurus plugin (docusaurus-plugin-copy-page-button) to the BookKeeper site3 documentation, enabling a "Copy page" button that exports docs as markdown with one-click handoffs to ChatGPT, Claude, and Gemini.

Changes:

  • Adds docusaurus-plugin-copy-page-button@^0.5.2 to site3/website/package.json dependencies
  • Registers the plugin in the existing plugins array in site3/website/docusaurus.config.js

Reviewed changes

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

File Description
site3/website/package.json Adds the new plugin as a dependency
site3/website/docusaurus.config.js Enables the plugin in the Docusaurus config

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

Copy link
Copy Markdown
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

We'd prefer keeping the dependencies minimal due to the high amount of supply chain attacks. I don't think that this plugin is necessary.

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.

3 participants