add docusaurus-plugin-copy-page-button#5299
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 8e47026:
|
✅ Deploy Preview for redux-starter-kit-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Friendly bump — happy to revise or close if this is not a fit. The docs deploy preview is green; the one red check I can see is the are-the-types-wrong job failing with an internal CLI error (Cannot read properties of undefined reading filename), so it does not look caused by the docs plugin change. |
|
Quick note: I used my agents to help generate this PR. Feel free to tag me (@portdeveloper) in this thread with any questions and I'll reply asap 🙏 |
|
Friendly nudge on this PR — happy to address any feedback if it'd help land it. The plugin recently shipped on react/react-native-website#5085 and continues to see adoption. Thanks for your time! |
|
|
Oh thanks, checking it rn |
…uto placement Addresses maintainer feedback on reduxjs/redux-toolkit#5299. - markdownUrl: point the AI links at per-page markdown you already publish (e.g. an llms.txt setup) without generateMarkdownRoutes. Boolean in config (options are JSON-serialized into the page); the function form is available on the React component prop for non-standard layouts. - Tracking: emit a 'copy-page-button:action' event ({action, url}) and expose data-copy-page-button-container / -trigger / data-copy-page-action attributes for analytics. - placement 'auto' is now deterministic: migrate the button from the in-article fallback into the ToC once the sidebar mounts, instead of leaving it stuck inline depending on hydration timing.
|
shipped all three in 0.8.0 and bumped this pr to it (it was on 0.5.1), so the preview's rebuilt. tracking: each dropdown action fires a placement: real bug — under markdownUrl: new option — if your before v1: locking these options + an SSR/swizzle mode that renders the button in static html so placement never depends on client injection. |
|
thanks @aryaemami59, really appreciate you opening #5309 and #5310 — saw both landed. since #5309 bumps are-the-types-wrong to 0.18.3 (that was the exact attw/fflate false-positive hitting this pr), a rebase onto main should turn the red check green. happy to rebase now if that helps — just say the word, or merge main in yourself if that's easier on your end 🙏 |
1f85c44 to
8e47026
Compare
|
Okay, seems reasonable. Thanks! |
This PR
adds docusaurus-plugin-copy-page-button to website/package.json
adds the plugin string to plugins in website/docusaurus.config.ts
puts a "Copy page" button in the docs sidebar — exports current page as clean markdown
adds one-click "Open in Claude / ChatGPT / Gemini" actions that prefill the markdown
why useful for RTK specifically:
RTK Query, createSlice, listener middleware all have a lot of subtle nuance per page. the typical "I want to ask claude about this" flow is reading a docs page → wanting to drop just that page in for context. this saves the selection-and-cleanup step.
zero config, auto-injects into the TOC sidebar, theme-aware.
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.
happy to close/rebase if not a fit