Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 0 additions & 148 deletions ai-ingestion.mdx

This file was deleted.

111 changes: 111 additions & 0 deletions ai/contextual-menu.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
title: "Contextual menu"
description: "Add one-click AI integrations to your docs"
icon: "square-menu"
---

import { PreviewButton } from "/snippets/previewbutton.jsx"

The contextual menu provides quick access to AI-optimized content and direct integrations with popular AI tools. When users select 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 of your choice with your documentation already loaded as context.

## Menu options

- **Copy page**: Copies the current page as Markdown for pasting as context into AI tools.
- **View as Markdown**: Opens the current page as Markdown.
- **Open in ChatGPT**: Creates a ChatGPT conversation with the current page as context.
- **Open in Claude**: Creates a Claude conversation with the current page as context.
- **Open in Perplexity**: Creates a Perplexity conversation with the current page as context.
- **[Your custom options](#adding-custom-options)**: Add your own options to the menu.

<Frame>
<img
src="/images/contextual-menu/contextual-menu.png"
alt="The expanded contextual menu showing the Copy page, View as Markdown, Open in ChatGPT, and Open in Claude menu items."
/>
</Frame>

## Enabling the contextual menu

Add the `contextual` field to your `docs.json` file and specify which options you want to include.

```json
{
"contextual": {
"options": [
"copy",
"view",
"chatgpt",

Check warning on line 37 in ai/contextual-menu.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/contextual-menu.mdx#L37

Did you really mean 'chatgpt'?
"claude",

Check warning on line 38 in ai/contextual-menu.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/contextual-menu.mdx#L38

Did you really mean 'claude'?
"perplexity"
]
}
}
```

## Adding custom options

Create custom options in the contextual menu by adding an object to the `options` array. Each custom option requires these properties:

<ResponseField name="title" type="string" required>
The title of the option.
</ResponseField>

<ResponseField name="description" type="string" required>
The description of the option. Displayed beneath the title when the contextual menu is expanded.
</ResponseField>

<ResponseField name="icon" type="string" required>
The icon of the option. Accepts any icon from the [Icons](/components/icons) collection.
</ResponseField>

<ResponseField name="href" type="string | object" required>
The href of the option. Use a string for simple links or an object for dynamic links with query parameters.

<Expandable title="href object">
<ResponseField name="base" type="string" required>
The base URL for the option.
</ResponseField>

<ResponseField name="query" type="object" required>
The query parameters for the option.

<Expandable title="query object">
<ResponseField name="key" type="string" required>
The query parameter key.
</ResponseField>

<ResponseField name="value" type="string" required>
The query parameter value. Use `$page` to insert the current page content in Markdown or `$path` to insert the current page path.
</ResponseField>
</Expandable>
</ResponseField>
</Expandable>
</ResponseField>

Example custom option:

```json {8-21}
"contextual": {
"options": [
"copy",
"view",
"chatgpt",
"claude",
"perplexity",
{
"title": "Ask Gemini",
"description": "Ask Google Gemini about the current page",
"icon": "sparkle",
"href": {
"base": "https://gemini.google.com/app",
"query": [
{
"key": "q",
"value": "Ask question about https://mintlify.com/docs$path.md"
}
]
}
}
]
}
```
50 changes: 50 additions & 0 deletions ai/llmstxt.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: "llms.txt"
description: "Make your content easier for LLMs to understand"

Check warning on line 3 in ai/llmstxt.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/llmstxt.mdx#L3

Did you really mean 'LLMs'?
icon: "file-code"
---

import { PreviewButton } from "/snippets/previewbutton.jsx"

The [llms.txt file](https://llmstxt.org) is an industry standard that helps LLMs index content more efficiently, similar to how a sitemap helps search engines.

Check warning on line 9 in ai/llmstxt.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/llmstxt.mdx#L9

Did you really mean 'LLMs'?

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.

View your `llms.txt` by appending `/llms.txt` to your site's URL.

<PreviewButton href="https://mintlify.com/docs/llms.txt">Open the llms.txt for this site</PreviewButton>

Your site's `llms.txt` is always up to date and requires zero maintenance.

## llms.txt structure

An `llms.txt` file is a plain Markdown file that contains:

- **Site title** as an H1 heading. This is the only required section of an `llms.txt`.
- **Site summary** typically in a blockquote.
- **Structured content sections** with descriptive links to key pages.

```mdx Example llms.txt
# Example product docs

> Learn how to get started, use the API, and explore tutorials.

## Guides
- [Getting started](https://example.com/docs/start): Intro guide
- [Install](https://example.com/docs/install): Setup steps

## Reference
- [API](https://example.com/docs/api): Endpoint list and usage
```

This structured approach allows LLMs to quickly process your documentation hierarchy and locate relevant content for user queries, improving the accuracy and speed of AI-assisted documentation searches.

Check warning on line 40 in ai/llmstxt.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/llmstxt.mdx#L40

Did you really mean 'LLMs'?

## llms-full.txt

The `llms-full.txt` file combines your entire documentation site into a single file as context for AI tools. Users can paste a single URL as context for AI tools for more relevant and accurate responses.

Every documentation site automatically hosts an `llms-full.txt` file at the root. View your `llms-full.txt` by appending `/llms-full.txt` to your site's URL.

<PreviewButton href="https://mintlify.com/docs/llms-full.txt">Open the llms-full.txt for this site</PreviewButton>

Your site's `llms-full.txt` is always up to date and requires zero maintenance.
21 changes: 21 additions & 0 deletions ai/markdown-export.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: "Markdown export"
description: "Quickly get Markdown versions of pages"
icon: "file-text"
---

import { PreviewButton } from "/snippets/previewbutton.jsx"

Markdown provides structured text that AI tools can process more efficiently than HTML, which results in better response accuracy, faster processing times, and lower token usage.

Mintlify automatically generates Markdown versions of pages that are optimized for AI tools and external integrations.

## .md URL extension

Add `.md` to any page's URL to view a Markdown version.

<PreviewButton href="https://mintlify.com/docs/ai/markdown-export.md">Open this page as Markdown</PreviewButton>

## Keyboard shortcut

Press <kbd>Command</kbd> + <kbd>C</kbd> (<kbd>Ctrl</kbd> + <kbd>C</kbd> on Windows) to copy a page as Markdown to yourclipboard.

Check warning on line 21 in ai/markdown-export.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/markdown-export.mdx#L21

Did you really mean 'Ctrl'?

Check warning on line 21 in ai/markdown-export.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/markdown-export.mdx#L21

Did you really mean 'yourclipboard'?
25 changes: 18 additions & 7 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,20 @@
"pages",
"navigation",
"themes",
"settings/custom-domain",
"ai-ingestion"
"settings/custom-domain"
]
},
{
"group": "AI optimization",
"pages": [
"guides/assistant",
"ai/llmstxt",
"ai/contextual-menu",
"ai/markdown-export",
"mcp",
"guides/claude-code",
"guides/cursor",
"guides/windsurf"
]
},
{
Expand Down Expand Up @@ -113,11 +125,6 @@
"pages": [
"guides/migration",
"guides/analytics",
"guides/assistant",
"mcp",
"guides/claude-code",
"guides/cursor",
"guides/windsurf",
"react-components",
"settings/custom-scripts",
"settings/seo",
Expand Down Expand Up @@ -487,6 +494,10 @@
{
"source": "settings/authentication-personalization/personalization-setup/shared-session",
"destination": "authentication-personalization/personalization-setup"
},
{
"source": "ai-ingestion",
"destination": "ai/llmstxt"
}
],
"integrations": {
Expand Down
4 changes: 2 additions & 2 deletions guides/assistant.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
title: "AI assistant"
title: "Assistant"
description: "Help users succeed with your product and find answers faster"
icon: "bot"
---

<Info>
The AI assistant is automatically enabled on [Pro, Growth, and Enterprise plans](https://mintlify.com/pricing?ref=assistant).
The assistant is automatically enabled on [Pro, Growth, and Enterprise plans](https://mintlify.com/pricing?ref=assistant).
</Info>

## About the assistant

The assistant answers questions about your documentation through natural language queries. It is embedded directly in your documentation site, providing users with immediate access to contextual help.

The assistant uses agentic RAG (retrieval-augmented generation) with tool calling powered by Claude Sonnet 4. When users ask questions, the assistant:

Check warning on line 15 in guides/assistant.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/assistant.mdx#L15

Did you really mean 'agentic'?

* **Searches and retrieves** relevant content from your documentation to provide accurate answers.
* **Cites sources** and provides navigable links to take users directly to referenced pages.
Expand All @@ -28,7 +28,7 @@

Users can access the assistant in two ways:

- **Keyboard shortcut**: <kbd>Command</kbd> + <kbd>I</kbd> (<kbd>Ctrl</kbd> + <kbd>I</kbd> on Windows)

Check warning on line 31 in guides/assistant.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/assistant.mdx#L31

Did you really mean 'Ctrl'?
- **Assistant button** next to the search bar
<img
src="/images/assistant/assistant-button-light.png"
Expand All @@ -51,7 +51,7 @@

Both methods open a chat panel on the right side of your docs. Users can ask any question and the assistant will search your documentation for an answer. If no relevant information is found, the assistant will respond that it cannot answer the question.

## Making content AI ingestible

Check warning on line 54 in guides/assistant.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/assistant.mdx#L54

Did you really mean 'ingestible'?

Structure your documentation to help the assistant provide accurate, relevant answers. Clear organization and comprehensive context benefit both human readers and AI understanding.

Expand All @@ -60,7 +60,7 @@
- Write descriptive headings for sections.
- Create a logical information hierarchy.
- Use consistent formatting across your docs.
- Include comprehensive metadata in page frontmatter.

Check warning on line 63 in guides/assistant.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/assistant.mdx#L63

Did you really mean 'frontmatter'?
- Break up long blocks of text into shorter paragraphs.
</Card>

Expand Down
Loading