Every docs page carries a Copy page split button in the top-end corner of the header. The primary action copies raw MDX; the chevron opens a dropdown with 14 built-ins across 4 sections plus tenant-defined custom entries.
Full component reference: /llm-first/contextual-menu.
This page is the nookdocs.config.json config reference for the contextual block.
Sections
| Section key | Built-in items |
content | Copy MD, Copy for LLMs, View raw, Copy URL |
ai-platforms | ChatGPT and Claude by default; Perplexity, Google AI Studio, Grok and Windsurf available via contextual.platforms |
mcp | MCP server URL, install command, Cursor / VS Code deep links |
custom | Tenant-defined entries from contextual.options |
Configure from the dashboard
Editor → Configurations → Layout → Contextual menu
Built-in sections — 4 checkboxes. Uncheck to hide a section from the dropdown. Leaving all checked (the default) is equivalent to omitting
contextual.enabled.AI platforms — 6 checkboxes. ChatGPT and Claude are checked by default; check others to offer them too.
Custom items — repeater with Title, Subtitle, Icon, URL. The URL field accepts template variables.
Config reference
contextual.enabledstring[]Whitelist of built-in sections to show. Omit to show all four. Unknown values are ignored. Accepted: "content", "ai-platforms", "mcp", "custom".
contextual.platformsstring[]Which AI platforms the ai-platforms section offers:
chatgpt, claude, perplexity, aistudio, grok, windsurf.
Omit and the reader sees ChatGPT and Claude. A menu listing seven destinations makes them read a list instead of clicking the one they came for, so the default is the pair most readers reach for — name the ones you want to change that.
Ignored when enabled leaves ai-platforms out; that hides the section
entirely.
{
"contextual": {
"platforms": ["chatgpt", "claude", "perplexity"]
}
}contextual.optionsArray<{title, description?, icon?, href}>Tenant-defined entries appended under the Custom section. Each has title, optional description, optional Lucide icon name, and href — the URL that opens on click.
contextual.display'header' | 'toc'default: headerWhere to render the menu. "header" (default) puts it in the top-end corner of the h1 row. "toc" (queued for a follow-up release) moves it into the right TOC sidebar.
Template variables in href
The href field supports four tokens that get replaced at click time:
| Variable | Resolves to |
$page | URL-encoded full page URL |
$path | URL-encoded page path |
$title | URL-encoded page title |
$mdx | URL-encoded MDX source (use sparingly — long pages produce massive URLs) |
Example
{
"contextual": {
"enabled": ["content", "ai-platforms", "custom"],
"options": [
{
"title": "Report an issue",
"description": "Open a GitHub issue pre-filled with the page path",
"icon": "bug",
"href": "https://github.com/acme/docs/issues/new?title=Feedback+on+$path"
},
{
"title": "Open in Linear",
"description": "Create a Linear ticket from this page",
"icon": "external-link",
"href": "https://linear.app/acme/new?title=Improve%20$title&description=$page"
}
]
}
}