Logoshadcn-docs-template
DocsDemo
Sections
  • Get Started
Getting Started
  • Introduction
  • Installation
Customization
  • Customizing the Template
  • MDC Components
  • Composables
  • Writing Documentation
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)

DocsCopyPage

PreviousNext

A component for copying page content and opening pages in external tools like ChatGPT, Claude, or viewing as Markdown.

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

PropTypeDescription
pageContentCollectionItemThe page content from Nuxt Content

Menu Items

The component provides these menu items:

  1. Markdown: Links to /raw{page.path}.md
  2. ChatGPT: Opens ChatGPT with page context
  3. Claude: Opens Claude with page context

Customization

The component uses a popover on mobile and dropdown menu on desktop for better UX.

CopyCodeButtonCodeBlockCommand

On This Page

UsageFeaturesCopy PageExternal ToolsAPI ReferenceDocsCopyPageMenu ItemsCustomization
© shadcn-vue.com