<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: port</title>
    <description>The latest articles on Forem by port (@port).</description>
    <link>https://forem.com/port</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2459712%2Fd03984f1-d806-4886-ad9d-55a9e1c42928.jpeg</url>
      <title>Forem: port</title>
      <link>https://forem.com/port</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/port"/>
    <language>en</language>
    <item>
      <title>I built a copy-for-LLMs button for Docusaurus. Then Ethereum and Sui shipped it.</title>
      <dc:creator>port</dc:creator>
      <pubDate>Mon, 27 Apr 2026 19:01:36 +0000</pubDate>
      <link>https://forem.com/port/i-built-a-copy-for-llms-button-for-docusaurus-then-ethereum-and-sui-shipped-it-3d7l</link>
      <guid>https://forem.com/port/i-built-a-copy-for-llms-button-for-docusaurus-then-ethereum-and-sui-shipped-it-3d7l</guid>
      <description>&lt;p&gt;*&lt;em&gt;A few months ago I got tired of selecting docs pages and pasting them into Claude. Half the time the nav came along with the content. So I built &lt;code&gt;docusaurus-plugin-copy-page-button&lt;/code&gt;: a one-line install that drops a Copy page button into your Docusaurus sidebar.&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
When I click the button, I get the page as clean markdown. I also added a dropdown that opens the page directly in ChatGPT, Claude, or Gemini.&lt;/p&gt;

&lt;p&gt;Setup:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install docusaurus-plugin-copy-page-button&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Then one line in &lt;code&gt;docusaurus.config.js:&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;plugins: ['docusaurus-plugin-copy-page-button']&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
That's it.&lt;/p&gt;

&lt;p&gt;Six months later, I see the plugin running on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ethereum execution-apis&lt;/li&gt;
&lt;li&gt;Sui, Walrus, Seal, SuiNS (Mysten Labs)&lt;/li&gt;
&lt;li&gt;Monad&lt;/li&gt;
&lt;li&gt;Flare&lt;/li&gt;
&lt;li&gt;Kaia&lt;/li&gt;
&lt;li&gt;Nillion&lt;/li&gt;
&lt;li&gt;Chronicle&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Around 10k installs a month, mostly blockchain ecosystems. I didn't aim at that niche, it just landed there.&lt;/p&gt;

&lt;h3&gt;
  
  
  What was actually hard
&lt;/h3&gt;

&lt;p&gt;Three things took most of the time.&lt;/p&gt;

&lt;p&gt;Content extraction. Docusaurus pages come wrapped in nav, breadcrumbs, edit-this-page links, footers, and a sidebar. The plugin walks the DOM, finds the article container, drops the chrome, and hands the rest to a markdown converter that handles code blocks, tables, lists, and admonitions.&lt;/p&gt;

&lt;p&gt;Then SPA route changes. Docusaurus uses client-side navigation. Inject the button on first load and it vanishes when the user clicks a link. The plugin watches popstate, Docusaurus's own events, and URL changes, then re-injects on each route.&lt;/p&gt;

&lt;p&gt;And mobile. Docusaurus collapses the TOC sidebar on small screens. The button needs to live somewhere visible without breaking the layout. Took a few iterations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;If you run a Docusaurus site, install it. If something's missing, open an issue.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/portdeveloper/docusaurus-plugin-copy-page-button" rel="noopener noreferrer"&gt;https://github.com/portdeveloper/docusaurus-plugin-copy-page-button&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;npm: &lt;a href="https://www.npmjs.com/package/docusaurus-plugin-copy-page-button" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/docusaurus-plugin-copy-page-button&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Live demo: &lt;a href="https://portdeveloper.github.io/copy-page-button-showcase/" rel="noopener noreferrer"&gt;https://portdeveloper.github.io/copy-page-button-showcase/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>docusaurus</category>
      <category>ai</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
