Sections
Getting Started
Components
- DocTabs
- Callout
- ComponentPreview
- CommandMenu
- CopyButton
- DocsSidebar
- DocsTableOfContents
- PageHeader
- SiteHeader
- CopyCodeButton
- DocsCopyPage
- CodeBlockCommand
- CommandMenuItem
- CommandMenuKbd
- GitHubLink
- LucideIcon
- MainNav
- MobileNav
- ModeSwitcher
- PageHeaderDescription
- PageHeaderHeading
- SiteBody
- SiteConfig
- SiteFooter
- OgImage (Custom)
The DocsCopyPage component provides a button with dropdown menu for copying page content and opening it in external AI tools.
Usage
<script setup lang="ts">
import { DocsCopyPage } from '@/components/DocsCopyPage'
import type { ContentCollectionItem } from '@nuxt/content'
const page: ContentCollectionItem = {
title: "My Page",
rawbody: "# Content here",
// ... other properties
}
</script>
<template>
<DocsCopyPage :page="page" />
</template>Features
Copy Page
Copies the entire page content (rawbody) to clipboard.
External Tools
Opens the current page in:
- Markdown View: View the raw markdown file
- ChatGPT: Opens with a pre-filled prompt
- Claude: Opens with a pre-filled prompt
API Reference
DocsCopyPage
| Prop | Type | Description |
|---|---|---|
page | ContentCollectionItem | The page content from Nuxt Content |
Menu Items
The component provides these menu items:
- Markdown: Links to
/raw{page.path}.md - ChatGPT: Opens ChatGPT with page context
- Claude: Opens Claude with page context
Customization
The component uses a popover on mobile and dropdown menu on desktop for better UX.