You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mintlify generates optimized formats and provides shortcuts that help users get faster, more accurate responses when using your documentation as context for LLMs and AI tools.
15
+
Generate optimized formats and provide shortcuts that help users get faster, more accurate responses when using your documentation as context for LLMs and AI tools.
16
16
17
17
## Contextual menu
18
18
@@ -22,6 +22,7 @@ Provide quick access to AI-optimized content and direct integrations with popula
22
22
***View as Markdown**: Opens the current page as Markdown.
23
23
***Open in ChatGPT**: Creates a ChatGPT conversation with the current page as context.
24
24
***Open in Claude**: Creates a Claude conversation with the current page as context.
25
+
*[**Your custom options**](#adding-custom-options): Add your own options to the contextual menu.
25
26
26
27
<Frame>
27
28
<img
@@ -47,6 +48,73 @@ Add the `contextual` field to your `docs.json` and specify which options you wan
47
48
}
48
49
```
49
50
51
+
### Adding custom options
52
+
53
+
Create custom options in the contextual menu by adding an object to the `options` array. Each custom option requires these properties:
The href of the option. Use a string for simple links or an object for dynamic links with query parameters.
69
+
70
+
<Expandabletitle="href object">
71
+
<ResponseFieldname="base"type="string"required>
72
+
The base URL for the option.
73
+
</ResponseField>
74
+
75
+
<ResponseFieldname="query"type="object"required>
76
+
The query parameters for the option.
77
+
78
+
<Expandabletitle="query object">
79
+
<ResponseFieldname="key"type="string"required>
80
+
The query parameter key.
81
+
</ResponseField>
82
+
83
+
<ResponseFieldname="value"type="string"required>
84
+
The query parameter value. Use `$page` to insert the current page content in Markdown or `$path` to insert the current page path.
85
+
</ResponseField>
86
+
</Expandable>
87
+
</ResponseField>
88
+
</Expandable>
89
+
</ResponseField>
90
+
91
+
Example custom option:
92
+
93
+
```json {7-20} Example with Perplexity icon="search"
94
+
"contextual": {
95
+
"options": [
96
+
"copy",
97
+
"view",
98
+
"chatgpt",
99
+
"claude",
100
+
{
101
+
"title": "Ask Perplexity",
102
+
"description": "Ask Perplexity about the current page",
103
+
"icon": "search",
104
+
"href": {
105
+
"base": "https://www.perplexity.ai/search",
106
+
"query": [
107
+
{
108
+
"key": "q",
109
+
"value": "Ask question about https://mintlify.com/docs$path.md"
110
+
}
111
+
]
112
+
}
113
+
}
114
+
]
115
+
}
116
+
```
117
+
50
118
## /llms.txt
51
119
52
120
The [/llms.txt file](https://llmstxt.org) is an industry standard that helps general-purpose LLMs index more efficiently, similar to how a sitemap helps search engines.
0 commit comments