Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

docusaurus-plugin-copy-page-button

Latest version: v0.8.7

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: portdeveloper
19 Stars
7 Forks
3 Versions
39.7K Downloads
JavaScript Repo language

Scan summary

docusaurus-plugin-copy-page-button was last scanned on 27 Nov 2026 at version 0.8.7. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 3 versions; the latest was published on 27 Nov 2026.
  • Findings: No rules fired in version 0.8.7.
  • Downloads: 39,736 downloads.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.8.7 LATEST 27 Nov 2026 No rules fired
0.8.6 10 Nov 2026 No rules fired
0.8.5 12 Oct 2026 No rules fired

No rules fired in 0.8.7

Findings

Findings for v0.8.7. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.8.7; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

Docusaurus Copy Page Button Plugin

npm downloads License: MIT

Live Demo · Read the story

Extract Docusaurus documentation content as markdown for AI tools like ChatGPT, Claude, Perplexity, and Gemini

A lightweight Docusaurus plugin that adds a "Copy page" button to your documentation site. Perfect for developers who want to quickly extract documentation content for AI assistance, code reviews, or content analysis.

Used by

Shipping in production on documentation sites across the ecosystem:

Source-confirmed public docs sites:

Using this plugin? Open a PR to add your project.

In review for Cypress documentation, Uniswap docs, Osmosis docs, BandChain docs, Capacitor docs, Lerna, and Sequelize.

Why Use This Plugin?

  • AI-Ready Content: Instantly convert documentation pages to clean markdown for ChatGPT, Claude, Perplexity, or other AI tools
  • Developer Productivity: Copy entire documentation pages without manual selection and cleanup
  • Zero Configuration: Works out of the box - just install and go
  • Documentation Workflow: Streamline the process of getting documentation context for AI assistance

Features

  • 📋 Copy page as markdown - Clean page content extraction
  • 👁️ View as markdown - Preview extracted content in new tab
  • 🤖 AI integration - Direct "Open in ChatGPT", "Open in Claude", "Open in Perplexity", and "Open in Gemini" buttons
  • ⚙️ Configurable actions - Show/hide specific dropdown actions (perfect for private sites)
  • ⚡ Auto-injection - Automatically adds to the docs page (no configuration needed)
  • 🧩 Theme integration - Import the React component directly when your site needs exact placement or no layout shift
  • 🔌 Optional MCP actions - Add Cursor and VS Code MCP install links when your docs expose an MCP server
  • 🎨 Theme-aware - Supports light/dark themes
  • 🎨 Customizable styling - Easy custom CSS classes and inline styles
  • 📱 Mobile-friendly - Responsive design
  • 🛠️ Zero-config - Works out of the box with sensible defaults

Installation

npm install docusaurus-plugin-copy-page-button

Usage

Option 1: Auto-injection

Add the plugin to your docusaurus.config.js:

module.exports = {
  plugins: ["docusaurus-plugin-copy-page-button"],
};

The button automatically appears in the table of contents sidebar when one is visible. On mobile and no-TOC pages, it falls back to the top of the article.

Option 2: Choose placement

Use placement: "article" if your theme header, sidebar, or table of contents layout makes the sidebar placement awkward:

module.exports = {
  plugins: [
    [
      "docusaurus-plugin-copy-page-button",
      {
        placement: "article",
      },
    ],
  ],
};

Available values:

  • "auto" - sidebar on desktop when visible, article on mobile/no-TOC pages. The button migrates from the article fallback up into the table of contents as soon as the sidebar mounts, so placement is deterministic across loads.
  • "toc" - table of contents only. Pin the button to the right rail and never fall back into the article column. Recommended when you want the most predictable placement on a docs site that always has a ToC.
  • "article" - top of the article column
Option 3: Custom positioning

Use custom styles to position the button differently:

module.exports = {
  plugins: [
    [
      "docusaurus-plugin-copy-page-button",
      {
        customStyles: {
          button: {
            style: {
              position: "fixed",
              top: "20px",
              right: "20px",
            },
          },
        },
      },
    ],
  ],
};
Option 4: Render the React component yourself

For high-traffic docs sites that want zero client-side placement shift, disable auto-injection and render the button from a swizzled Docusaurus theme component.

// docusaurus.config.js
module.exports = {
  plugins: [
    [
      "docusaurus-plugin-copy-page-button",
      {
        injectButton: false,
        generateMarkdownRoutes: true,
      },
    ],
  ],
};
// src/theme/DocItem/Layout/index.tsx
import CopyPageButton from "docusaurus-plugin-copy-page-button/react";

export default function DocItemLayout(props) {
  return (
    <>
      <div style={{display: "flex", justifyContent: "flex-end"}}>
        <CopyPageButton generateMarkdownRoutes />
      </div>
      {/* render your normal Docusaurus DocItem layout here */}
    </>
  );
}

This path is best when maintainers care about first paint, exact visual placement, or avoiding any post-hydration DOM insertion.

Configuration

Enabled Actions

You can control which actions appear in the dropdown menu using the enabledActions option. This is particularly useful for private documentation sites where the AI tool links (ChatGPT/Claude/Perplexity/Gemini) won't work properly.

module.exports = {
  plugins: [
    [
      "docusaurus-plugin-copy-page-button",
      {
        // Only show copy and view actions (hide AI tools)
        enabledActions: ['copy', 'view'],
      },
    ],
  ],
};

Available actions:

  • 'copy' - Copy page as Markdown
  • 'view' - View as Markdown in new tab
  • 'chatgpt' - Open in ChatGPT
  • 'claude' - Open in Claude
  • 'perplexity' - Open in Perplexity
  • 'gemini' - Open in Gemini
  • 'mcp-copy' - Copy MCP server JSON (shown when mcpServer is configured)
  • 'mcp-cursor' - Install MCP server in Cursor (shown when mcpServer is configured)
  • 'mcp-vscode' - Install MCP server in VS Code (shown when mcpServer is configured)

Default: Standard actions are enabled: ['copy', 'view', 'chatgpt', 'claude', 'perplexity', 'gemini']. MCP actions are enabled automatically only when mcpServer is configured.

Example configurations:

// Only copy functionality
enabledActions: ['copy']

// Copy and view only (no AI tools)
enabledActions: ['copy', 'view']

// All standard AI actions (default)
enabledActions: ['copy', 'view', 'chatgpt', 'claude', 'perplexity', 'gemini']
MCP server actions

If your documentation site exposes an MCP server, configure it to add MCP actions to the dropdown:

module.exports = {
  plugins: [
    [
      "docusaurus-plugin-copy-page-button",
      {
        mcpServer: {
          name: "my-docs",
          url: "https://docs.example.com/mcp",
        },
      },
    ],
  ],
};

The plugin can copy the MCP JSON config and generate install links for Cursor and VS Code. Cursor install links follow Cursor's MCP deeplink format, and VS Code install links use vscode:mcp/install.

For URL-only MCP servers, you can also pass the URL string directly:

mcpServer: "https://docs.example.com/mcp"

The shorthand uses docs as the server name.

Custom Styling

You can customize the appearance of the copy page button by passing a customStyles option:

module.exports = {
  plugins: [
    [
      "docusaurus-plugin-copy-page-button",
      {
        customStyles: {
          button: {
            className: "my-custom-button",
            style: {
              backgroundColor: "#4CAF50",
              color: "white",
              borderRadius: "8px",
            },
          },
          dropdown: {
            className: "my-custom-dropdown",
            style: {
              backgroundColor: "#f8f9fa",
              border: "2px solid #4CAF50",
            },
          },
          dropdownItem: {
            style: {
              padding: "12px 20px",
              fontSize: "16px",
            },
          },
          container: {
            className: "my-button-container",
          },
        },
      },
    ],
  ],
};
Available Style Targets
  • button - The main copy page button (positioning styles like position, top, left are automatically applied to the container)
  • dropdown - The dropdown menu that appears when clicking the button
  • dropdownItem - Individual items in the dropdown menu
  • container - The wrapper container around the button
Style Options

Each target accepts:

  • className - CSS class name(s) to add to the element
  • style - Inline styles object (React style format)

Custom styles are merged with the default styles, so you only need to specify what you want to change.

Example: Custom positioning
module.exports = {
  plugins: [
    [
      "docusaurus-plugin-copy-page-button",
      {
        customStyles: {
          button: {
            style: {
              position: "fixed",
              top: "100px",
              left: "100px",
              zIndex: 1000,
            },
          },
        },
      },
    ],
  ],
};

Note: Positioning styles (position, top, right, bottom, left, zIndex, transform) specified in the button configuration are automatically applied to the container element for proper positioning control.

Example: Styling without positioning
module.exports = {
  plugins: [
    [
      "docusaurus-plugin-copy-page-button",
      {
        customStyles: {
          button: {
            style: {
              backgroundColor: "transparent",
              border: "2px solid #007acc",
              color: "#007acc",
              borderRadius: "12px",
              fontWeight: "bold",
            },
          },
        },
      },
    ],
  ],
};
Localization

Two ways to translate the visible labels, each suited to a different site shape.

Option A — labels plugin option (works for any site, including monolingual or one-site-per-language setups)

Pass label overrides directly in your docusaurus.config.js. The labels object wins over everything else when set:

module.exports = {
  plugins: [
    [
      "docusaurus-plugin-copy-page-button",
      {
        labels: {
          button: { label: "ページをコピー" },
          copy: {
            title: "ページをコピー",
            description: "このページを Markdown としてコピー",
          },
          view: { title: "Markdown で表示" },
          chatgpt: { title: "ChatGPT で開く" },
          claude: { title: "Claude で開く" },
          perplexity: { title: "Perplexity で開く" },
          gemini: { title: "Gemini で開く" },
        },
      },
    ],
  ],
};

Override only the keys you need — anything you leave out falls back to the default English (or to an i18n/<locale>/code.json entry; see Option B).

This is the right option when each language has its own Docusaurus site (each with its own defaultLocale), because Docusaurus's <Translate> machinery only applies to non-default locales and labels sidesteps that constraint.

Option B — Docusaurus i18n (standard multi-locale sites)

For a site with i18n: { defaultLocale, locales } covering multiple locales, all visible strings also flow through Docusaurus's translate() calls. Add the translation IDs to i18n/<locale>/code.json for each non-default locale:

{
  "copyPageButton.button.label": { "message": "コピー" },
  "copyPageButton.copy.title": { "message": "ページをコピー" },
  "copyPageButton.copy.description": { "message": "このページを Markdown としてコピー" },
  "copyPageButton.view.title": { "message": "Markdown で表示" },
  "copyPageButton.chatgpt.title": { "message": "ChatGPT で開く" },
  "copyPageButton.claude.title": { "message": "Claude で開く" },
  "copyPageButton.perplexity.title": { "message": "Perplexity で開く" },
  "copyPageButton.gemini.title": { "message": "Gemini で開く" }
}

Note: docusaurus write-translations only scans your site's source code, not node_modules. The plugin's IDs won't be auto-extracted; copy them in manually from the table below.

Available translation IDs:

ID Default English
copyPageButton.button.label Copy page (visible button text)
copyPageButton.copy.title / .description Copy page / Copy the page as Markdown for LLMs
copyPageButton.view.title / .description View as Markdown / View this page as plain text
copyPageButton.chatgpt.title / .description Open in ChatGPT / Ask questions about this page
copyPageButton.claude.title / .description Open in Claude / Ask questions about this page
copyPageButton.perplexity.title / .description Open in Perplexity / Ask questions about this page
copyPageButton.gemini.title / .description Open in Gemini / Ask questions about this page
copyPageButton.mcpCopy.title / .description Copy MCP config / Copy MCP server JSON
copyPageButton.mcpCursor.title / .description Install in Cursor / Open Cursor MCP installer
copyPageButton.mcpVscode.title / .description Install in VS Code / Open VS Code MCP installer

Markdown URL routes

Set generateMarkdownRoutes: true to emit a plain-markdown URL for each generated documentation page:

module.exports = {
  plugins: [["docusaurus-plugin-copy-page-button", { generateMarkdownRoutes: true }]],
};

For a Docusaurus page rendered at build/page/index.html, the plugin writes build/page.md, so static hosts serve it at https://your-docs.com/page.md. Users can now share https://your-docs.com/page.md directly with Claude, ChatGPT, or any tool that can fetch URLs as context. When this option is enabled, the AI tool actions also point at the .md URL.

Blog posts get a .md too. Blog listing pages (the post list, tag, and author pages) are skipped, because they hold several posts; those pages also don't show the button.

Pointing the AI links at markdown you already publish

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm docusaurus-plugin-copy-page-button

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229