Skip to main content

Foundations

Contextual menu

14 built-in options + tenant custom items, all in the Copy Page dropdown at the top of every page.

Anatomy

Every docs page has a Copy page split button in the top-end corner of the header. The primary button copies the raw Markdown source. The chevron opens a dropdown organized into four sections:

Content

Copy MD, copy for LLMs, view raw, copy URL

AI platforms

ChatGPT, Claude, Perplexity, Google AI Studio, Grok, Windsurf

MCP server

Server URL, install command, Cursor / VS Code deep links

Custom

Tenant-defined items from nookdocs.config.json

Built-in items (14 total)

Content (4)

ItemWhat it does
Copy page as MarkdownRaw MDX source to clipboard. Use when you want to quote the page verbatim.
Copy as Markdown for LLMsSource + a context header that points at the full component spec so any LLM can write valid NookDocs MDX.
View page as raw MarkdownOpens the .md URL in a new tab. Crawler-friendly.
Copy page URLCanonical https URL to clipboard.

AI platforms (6)

Each option deep-links to a new chat with the page URL + source pre-filled as the first message. The reader picks their preferred LLM and starts from a context-aware conversation.

OptionTarget
Open in ChatGPTchat.openai.com/?q=...
Open in Claudeclaude.ai/new?q=...
Open in Perplexityperplexity.ai/?q=...
Open in Google AI Studioaistudio.google.com/app/prompts/new_chat?prompt=...
Open in Grokgrok.com/?q=...
Connect to Windsurfwindsurf://chat?prompt=... (Codeium IDE deep link)

ChatGPT, Claude, and Perplexity all support browse — they can fetch the full component spec URL and use it as context, even from these "small" deep links. The reader doesn't need to paste anything else.

MCP server (4)

The Model Context Protocol server (Phase 3.3) lets LLMs query the component library and search docs interactively, instead of relying on a paste. These options bootstrap the connection:

OptionWhat it does
Copy MCP server URLyour site's /mcp endpoint URL to clipboard
Copy MCP install commandnpx nookdocs-mcp install --client cursor to clipboard
Install MCP in Cursorcursor://... deep link — opens Cursor with the server pre-configured
Install MCP in VS Codevscode://mcp/install?... deep link via the Claude Code extension

The MCP server itself ships in Phase 3.3 as a separate npm package. Until then these options copy the install command but the server URL responds with a placeholder. Tenants who want to ship before MCP launches can disable the MCP section via contextual.enabled (see below).

Configure from the dashboard

You can configure everything on this page two ways — edit nookdocs.config.json directly in your repo, or use the dashboard UI:

Dashboard → your project → Editor → Configurations → Layout → Contextual menu

The panel has two controls:

  • Built-in sections — four checkboxes (Content, AI platforms, MCP server, Custom items). Unchecking a section hides it from every page's Copy page dropdown. Leaving all four checked (the default) is equivalent to omitting contextual.enabled entirely.

  • Custom items — a repeater with Title, Subtitle, Icon, and URL fields per entry. The URL field accepts the same $page / $path / $title / $mdx template variables described below.

Hitting Save commits an updated nookdocs.config.json to your connected repo, so the two paths produce identical results — pick whichever fits your workflow.

Custom options

Add your own menu items by setting contextual.options in nookdocs.config.json (or via the dashboard — see above). Each option appears in a "Custom" section below the built-ins.

{
  "contextual": {
    "options": [
      {
        "title": "File a bug report",
        "description": "GitHub issues for the docs team",
        "icon": "bug",
        "href": "https://github.com/acme/docs/issues/new?title=Bug+on+$path"
      },
      {
        "title": "Open in Linear",
        "description": "Create a Linear ticket pre-filled with this page URL",
        "icon": "external-link",
        "href": "https://linear.app/acme/team/docs/new?title=Improve%20$title&description=$page"
      }
    ]
  }
}

Template variables

The href field supports four template variables resolved at click time:

VariableResolves to
$pageURL-encoded full page URL (e.g. https%3A%2F%2Fdocs.acme.com%2Fapi%2Fauth)
$pathURL-encoded page path (e.g. %2Fapi%2Fauth)
$titleURL-encoded page title (e.g. Authentication)
$mdxURL-encoded MDX source (use sparingly — long pages produce massive URLs)

$mdx can produce URLs in the tens of kilobytes for long pages. Some platforms (e.g. older Slack share targets) reject URLs over a few KB. Test your custom option on a representative page before shipping.

Disable built-in sections

If a section doesn't fit your tenant's workflow, hide it via contextual.enabled:

{
  "contextual": {
    "enabled": ["content", "ai-platforms", "custom"]
  }
}

This config shows Content, AI platforms, and Custom — but hides MCP server because the tenant isn't using one yet.

Section valueBuilt-in items hidden if absent
contentCopy MD, Copy for LLMs, View raw, Copy URL
ai-platformsChatGPT, Claude, Perplexity, Google AI Studio, Grok, Windsurf
mcpMCP server URL, install command, Cursor / VS Code links
customTenant-defined entries from contextual.options

Omit the enabled key entirely to show all sections (the default).

Display position

The menu defaults to the page header (top-end corner of the h1 row). The Phase 3 plan includes an alternative display: "toc" mode that moves the menu into the right TOC sidebar — useful for very narrow page layouts where the header is crowded. That mode is queued for a follow-up commit and not yet surfaced in the dashboard UI; tenants who want to experiment can hand-edit the display key in nookdocs.config.json and it will round-trip through the dashboard without being clobbered on Save.

{
  "contextual": {
    "display": "header"
  }
}

Phase 1 → Phase 3 evolution

The Copy Page dropdown started in Phase 1 with five options (Copy MD, Copy for LLMs, Copy URL, ChatGPT, Claude). Phase 3.2 expanded it to 14 built-ins + custom support. The data contract stayed the same — source, url, title, description props on <CopyPageMenu> — so the upgrade was additive.

What's coming

PhaseAddition
3.3Real MCP server backing the install/cursor/vscode options
3.4nookdocs migrate --from mintlify adds a "Migrate Mintlify config" option for tenants importing
3.5.cursorrules / CLAUDE.md auto-generation links
9Per-page analytics for which menu items get clicked (content gap signal)
Was this page helpful?

Last updated August 11, 2026