Documentation
AI & optimization

Contextual menu

Add a per-page menu that copies the page as Markdown or opens it in an AI tool.

The contextual menu is a per-page "Copy page" control that lets readers grab a page as Markdown or send it to an AI tool. Configure it with the contextual block in velu.json.

{
"contextual": {
"options": ["copy", "view", "chatgpt", "claude"],
"display": "header"
}
}

If you don't set contextual, the default options are copy, view, chatgpt, and claude.

Options

options is an ordered list of actions. The common ones:

OptionWhat it does
copyCopy the page as Markdown to the clipboard.
viewOpen the page's raw Markdown (the .md twin).
assistantOpen the page's question in Ask AI.
chatgptOpen the page in ChatGPT.
claudeOpen the page in Claude.
perplexityOpen the page in Perplexity.
grokOpen the page in Grok.
aistudioOpen the page in Google AI Studio.
devinOpen the page in Devin.
windsurfOpen the page in Windsurf.
cursorOpen the Cursor installer for the docs MCP server.
vscodeOpen the VS Code installer for the docs MCP server.
mcpCopy an mcp-remote command for the docs MCP server.
add-mcpCopy the same client-neutral MCP command.
devin-mcpCopy a Devin CLI command for the docs MCP server.
download-specDownload the OpenAPI spec (on API reference pages).

You can also add a custom entry as an object with title, href, description, and icon:

{
"contextual": {
"options": [
"copy",
"view",
"chatgpt",
"claude",
{
"title": "Ask in Slack",
"href": "https://acme.com/slack",
"description": "Get help from the community.",
"icon": "slack"
}
]
}
}

Icons are Lucide icon ids.

Display

display controls where the menu appears:

  • header (default) — next to the page title.
  • toc — in the table of contents on the right.
{ "contextual": { "display": "toc" } }
Was this page helpful?