All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
- README now leads with an animated demo of the button in action instead of a static screenshot. No code changes.
generateMarkdownRoutesnow works on sites configured withtrailingSlash: false. Docusaurus emits flat<route>.htmlfiles under that setting (instead of the default<route>/index.html), which the build-time markdown generator didn't look for — so it silently produced zero.mdfiles. It now resolves both layouts.
- The actions dropdown now flips upward when there isn't enough room below the button (e.g. when the button is placed near the bottom of the page content, such as in a footer). It measures available viewport space and opens up or down accordingly, so the menu no longer renders off-screen.
- Corrected the malformed "Open in Perplexity" icon. The previous SVG path didn't match the Perplexity mark; it now uses the official logo. (#5)
- New
markdownUrloption to control which URL the "Open in ChatGPT/Claude/…" actions reference, independent ofgenerateMarkdownRoutes. Sites that already publish per-page markdown (e.g. an llms.txt setup) can setmarkdownUrl: trueto point the AI links at/path.mdwithout this plugin generating any files. Acceptstrue/false, or a(pageUrl) => stringfunction when rendering the React component directly. - Interaction tracking hooks. A
copy-page-button:actionevent now fires ondocumentfor every dropdown action (detail: { action, url }), and the rendered DOM exposesdata-copy-page-button-container,data-copy-page-button-trigger, anddata-copy-page-action="<id>"attributes for delegated analytics listeners.
placement: "auto"is now deterministic across loads. Previously, if the ToC sidebar hadn't mounted by the first injection attempt, the button could stay stuck in the in-article fallback for the rest of the page's life — and since that timing varied per load, placement looked inconsistent. The button now migrates from the article fallback up into the sidebar as soon as it appears.
- Localization support with two override paths. (1) New
labelsplugin option lets sites pass title/description strings directly indocusaurus.config.js— works for any site, including one-site-per-language setups where each site has its owndefaultLocale. (2) All visible labels and descriptions ("Copy page", "View as Markdown", "Open in ChatGPT", etc.) also go through Docusaurus'stranslate(), so standard multi-locale sites can override them per locale viai18n/<locale>/code.json. Default English text is unchanged. See README "Localization" section for the full ID list.
- TypeScript declarations now accept all supported
mcpServerforms, including URL strings and objects that rely on the default server name.
- Dropdown positioning is calculated before the menu first renders, preventing the first interaction from briefly showing the menu in the viewport's top-left corner.
- Auto placement no longer injects a copy button into generic custom pages that only expose a
mainelement. The no-ToC fallback now targets docs/article containers only.
- Added Perplexity as a first-class AI action.
- Added optional MCP actions for copying MCP server config and opening Cursor or VS Code MCP install links when
mcpServeris configured. - Added
placementoption withauto,toc, andarticlemodes. - Added
injectButton: falsefor sites that want to render the React component manually while still using build-time markdown route generation. - Added a stable
docusaurus-plugin-copy-page-button/reactcomponent entrypoint with TypeScript declarations. - Added TypeScript declarations for plugin options.
- Auto placement now uses article placement on mobile or when the table of contents is hidden, avoiding invisible buttons inside hidden desktop ToC containers.
- Removed global breadcrumb width overrides from the component stylesheet so manual component usage does not alter host site breadcrumbs.
- No-ToC fallback now injects the button inline after the breadcrumbs instead of as a
position: fixedoverlay in the viewport corner. Pages withhideTableOfContentsor naturally empty TOCs now get the button at the top of the article column. - Reserve
min-height: 56pxon the sidebar-mode container so the button slot is sized before React mounts, reducing layout shift on first paint. - Button and dropdown items inherit
--ifm-font-family-baseinstead of falling back to the browser's default button font. - Replaced the chained
setTimeoutpolling with aMutationObserverondocument.bodyso the button appears the moment the TOC or article mounts. Periodic check remains as a safety net.
Reported by @Simek in facebook/react-native-website#5085.
- ChatGPT button now opens
chatgpt.comdirectly instead of relying on the legacychat.openai.comredirect. - Gemini button now routes to Google's AI Mode (
google.com/search?udm=50), which actually prefills the prompt — the previousgemini.google.com/guided-learning?query=URL silently ignored the query parameter.
- Added optional markdown URL generation for Docusaurus docs pages with
generateMarkdownRoutes.