Add a polished copy-to-clipboard button to Starlight docs page titles that copies full pages as Markdown.
- Install the plugin:
pnpm add github:dionysuzx/starlight-copy-button- Add it to your Starlight config:
// astro.config.mjs
import starlight from '@astrojs/starlight';
import { defineConfig } from 'astro/config';
import starlightCopyButton from 'starlight-copy-button';
export default defineConfig({
integrations: [
starlight({
title: 'My Docs',
plugins: [starlightCopyButton()],
}),
],
});