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
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
-
## Contextual menu
18
-
19
17
Provide quick access to AI-optimized content and direct integrations with popular AI tools from a contextual menu on your pages.
20
18
21
-
***Copy page**: Copies the current page as Markdown for pasting as context into AI tools.
22
-
***View as Markdown**: Opens the current page as Markdown.
23
-
***Open in ChatGPT**: Creates a ChatGPT conversation with the current page as context.
24
-
***Open in Claude**: Creates a Claude conversation with the current page as context.
25
-
***Ask Perplexity**: Creates a Perplexity conversation with the current page as context.
26
-
*[**Your custom options**](#adding-custom-options): Add your own options to the contextual menu.
19
+
-**Copy page**: Copies the current page as Markdown for pasting as context into AI tools.
20
+
-**View as Markdown**: Opens the current page as Markdown.
21
+
-**Open in ChatGPT**: Creates a ChatGPT conversation with the current page as context.
22
+
-**Open in Claude**: Creates a Claude conversation with the current page as context.
23
+
-**Ask Perplexity**: Creates a Perplexity conversation with the current page as context.
24
+
-[**Your custom options**](#adding-custom-options): Add your own options to the contextual menu.
27
25
28
26
<Frame>
29
-
<img
30
-
src="/images/contextual-menu/contextual-menu.png"
31
-
alt="The expanded contextual menu showing the Copy page, View as Markdown, Open in ChatGPT, and Open in Claude menu items."
32
-
/>
27
+

33
28
</Frame>
34
29
35
30
### Enabling the contextual menu
@@ -68,20 +63,18 @@ Create custom options in the contextual menu by adding an object to the `options
The href of the option. Use a string for simple links or an object for dynamic links with query parameters.
71
-
66
+
72
67
<Expandabletitle="href object">
73
68
<ResponseFieldname="base"type="string"required>
74
69
The base URL for the option.
75
70
</ResponseField>
76
-
77
71
<ResponseFieldname="query"type="object"required>
78
72
The query parameters for the option.
79
73
80
74
<Expandabletitle="query object">
81
75
<ResponseFieldname="key"type="string"required>
82
76
The query parameter key.
83
77
</ResponseField>
84
-
85
78
<ResponseFieldname="value"type="string"required>
86
79
The query parameter value. Use `$page` to insert the current page content in Markdown or `$path` to insert the current page path.
87
80
</ResponseField>
@@ -92,7 +85,7 @@ Create custom options in the contextual menu by adding an object to the `options
92
85
93
86
Example custom option:
94
87
95
-
```json{7-20} Example with Perplexity icon="search"
88
+
```json Example with Perplexity {7,8,9,10,11,12,13,14,15,16,17,18,19,20} icon=search
96
89
"contextual": {
97
90
"options": [
98
91
"copy",
@@ -123,26 +116,26 @@ The [/llms.txt file](https://llmstxt.org) is an industry standard that helps gen
123
116
124
117
Every documentation site automatically hosts an `/llms.txt` file at the root that lists all available pages in your documentation. AI tools can use this file to understand your documentation structure and find relevant content to user prompts.
125
118
126
-
<PreviewButtonhref="https://mintlify.com/docs/llms.txt">Open llms.txt for this site</PreviewButton>
119
+
Open llms.txt for this site
127
120
128
121
## /llms-full.txt
129
122
130
123
The `/llms-full.txt` file combines your entire documentation site into a single file as context for AI tools.
131
124
132
125
Every documentation site automatically hosts an `/llms-full.txt` file at the root.
133
126
134
-
<PreviewButtonhref="https://mintlify.com/docs/llms-full.txt">Open llms-full.txt for this site</PreviewButton>
127
+
Open llms-full.txt for this site
135
128
136
129
## Generating Markdown versions of pages
137
130
138
131
Markdown provides structured text that AI tools can process more efficiently than HTML, which results in better response times and lower token usage.
139
132
140
133
### .md extension
141
134
142
-
Add a `.md` to a page's URL to display a Markdown version of that page.
135
+
Add a `.md` to a page's URL to display a Markdown version of that page.
Copy file name to clipboardExpand all lines: code.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ icon: "code"
8
8
9
9
You can add inline code snippets or code blocks. Code blocks support meta options for syntax highlighting, titles, line highlighting, icons, and more.
10
10
11
-
### Inline code
11
+
### Hello world
12
12
13
13
To denote a `word` or `phrase` as code, enclose it in backticks (\`).
14
14
@@ -22,7 +22,7 @@ Use [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-c
22
22
23
23
Specify the programming language for syntax highlighting and to enable meta options. Add any meta options, like a title or icon, after the language.
24
24
25
-
```java HelloWorld.javalines icon="java"
25
+
```java HelloWorld.java icon=java lines
26
26
classHelloWorld {
27
27
publicstaticvoidmain(String[] args) {
28
28
System.out.println("Hello, World!");
@@ -95,7 +95,7 @@ const hello = "world";
95
95
96
96
Add an icon to your code block. You can use [FontAwesome](https://fontawesome.com/icons) icons, [Lucide](https://lucide.dev/icons/) icons, or absolute URLs.
97
97
98
-
```javascript icon="square-js"
98
+
```javascript icon=square-js
99
99
consthello="world";
100
100
```
101
101
@@ -109,7 +109,7 @@ const hello = "world";
109
109
110
110
Highlight specific lines in your code blocks using `highlight` with the line numbers or ranges you want to highlight.
111
111
112
-
```javascript Line Highlighting Example highlight= {1-2,5}
112
+
```javascript Line Highlighting Example {1,2,5}
113
113
constgreeting="Hello, World!";
114
114
functionsayHello() {
115
115
console.log(greeting);
@@ -131,7 +131,7 @@ sayHello();
131
131
132
132
Focus on specific lines in your code blocks using `focus` with line numbers or ranges.
133
133
134
-
```javascript Line Focus Example focus= {2,4-5}
134
+
```javascript Line Focus Example focus=2,4,5
135
135
constgreeting="Hello, World!";
136
136
functionsayHello() {
137
137
console.log(greeting);
@@ -304,7 +304,7 @@ sayHello();
304
304
305
305
Add single line comments with `[!code ++]` and `[!code --]` to mark added and removed lines. You can also mark multiple lines with a single comment, such as `[!code ++:3]` or `[!code --:5]`.
0 commit comments