Skip to main content

Contextual menu

Add one-click AI integrations to your docs
The contextual menu provides quick access to AI-optimized content and direct integrations with popular AI tools. When users open the contextual menu on any page, they can copy content as context for AI tools or open conversations in ChatGPT, Claude, Perplexity, or a custom tool with your documentation loaded as context. Enable any of the built-in options by adding their identifier to your configuration.
Contextual menu showing AI actions

Enabling the contextual menu

Add the contextual field to your docs.json file and include the options you want:

Adding custom options

Create custom options by adding an object to the options array. Each custom option supports:
string
required
The title of the option.
string
required
The description shown when the contextual menu expands.
string
required
The icon to display. Options: Font Awesome name, Lucide name, JSX-compatible SVG in {} braces, URL, or local path.
string
Font Awesome style if using FA icons. One of: regular, solid, light, thin, sharp-solid, duotone, brands.
string | object
required
The target link. Use a string for simple links or an object for dynamic links with query params.

href object

string
required
The base URL for the option.
object
required
The query parameters to append to the base URL. Use these placeholders in value: - $page: current page content in Markdown - $path: current page path - $mcp: hosted MCP server URL

Example custom option

Custom option examples