diff --git a/ai-ingestion.mdx b/ai-ingestion.mdx deleted file mode 100644 index 0312c1d58..000000000 --- a/ai-ingestion.mdx +++ /dev/null @@ -1,148 +0,0 @@ ---- -title: "AI ingestion" -description: "Prepare your documentation for LLMs and AI tools" -icon: "bot-message-square" ---- - -export const PreviewButton = ({ children, href }) => { - return ( - - {children} - - ) -} - -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. - -## Contextual menu - -Provide quick access to AI-optimized content and direct integrations with popular AI tools from a contextual menu on your pages. - -* **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. -* **Ask Perplexity**: Creates a Perplexity conversation with the current page as context. -* [**Your custom options**](#adding-custom-options): Add your own options to the contextual menu. - - - The expanded contextual menu showing the Copy page, View as Markdown, Open in ChatGPT, and Open in Claude menu items. - - -### Enabling the contextual menu - -Add the `contextual` field to your `docs.json` and specify which options you want to include in your menu. - -```json -{ - "contextual": { - "options": [ - "copy", - "view", - "chatgpt", - "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: - - - The title of the option. - - - - The description of the option. Displayed beneath the title when the contextual menu is expanded. - - - - The icon of the option. Accepts any icon from the [Icons](/components/icons) collection. - - - - The href of the option. Use a string for simple links or an object for dynamic links with query parameters. - - - - The base URL for the option. - - - - The query parameters for the option. - - - - The query parameter key. - - - - The query parameter value. Use `$page` to insert the current page content in Markdown or `$path` to insert the current page path. - - - - - - -Example custom option: - -```json {7-20} Example with Perplexity icon="search" -"contextual": { - "options": [ - "copy", - "view", - "chatgpt", - "claude", - { - "title": "Ask Perplexity", - "description": "Ask Perplexity about the current page", - "icon": "search", - "href": { - "base": "https://www.perplexity.ai/search", - "query": [ - { - "key": "q", - "value": "Ask question about https://mintlify.com/docs$path.md" - } - ] - } - } - ] -} -``` - -## /llms.txt - -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. - -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. - -Open llms.txt for this site - -## /llms-full.txt - -The `/llms-full.txt` file combines your entire documentation site into a single file as context for AI tools. - -Every documentation site automatically hosts an `/llms-full.txt` file at the root. - -Open llms-full.txt for this site - -## Generating Markdown versions of pages - -Markdown provides structured text that AI tools can process more efficiently than HTML, which results in better response times and lower token usage. - -### .md extension - -Add a `.md` to a page's URL to display a Markdown version of that page. - -Open quickstart.md - -### Command \+ C shortcut - -Select Command \+ C (Ctrl \+ C on Windows) to copy any page as Markdown. diff --git a/ai/contextual-menu.mdx b/ai/contextual-menu.mdx new file mode 100644 index 000000000..cf094d83c --- /dev/null +++ b/ai/contextual-menu.mdx @@ -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. + + + The expanded contextual menu showing the Copy page, View as Markdown, Open in ChatGPT, and Open in Claude menu items. + + +## 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", + "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: + + + The title of the option. + + + + The description of the option. Displayed beneath the title when the contextual menu is expanded. + + + + The icon of the option. Accepts any icon from the [Icons](/components/icons) collection. + + + + The href of the option. Use a string for simple links or an object for dynamic links with query parameters. + + + + The base URL for the option. + + + + The query parameters for the option. + + + + The query parameter key. + + + + The query parameter value. Use `$page` to insert the current page content in Markdown or `$path` to insert the current page path. + + + + + + +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" + } + ] + } + } + ] +} +``` diff --git a/ai/llmstxt.mdx b/ai/llmstxt.mdx new file mode 100644 index 000000000..d63dd64ad --- /dev/null +++ b/ai/llmstxt.mdx @@ -0,0 +1,47 @@ +--- +title: "llms.txt" +description: "Make your content easier for LLMs to read and index" +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. + +Mintlify automatically hosts an `llms.txt` file at the root of your project 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 documentation site's URL. + +Open the llms.txt for this site + +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`. +- **Structured content sections** with descriptive links to key pages. + +```mdx Example llms.txt +# Example product docs + +## 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. + +## llms-full.txt + +The `llms-full.txt` file combines your entire documentation site into a single file as context for AI tools and is indexed by LLM traffic. Users can paste a single URL as context for AI tools for more relevant and accurate responses. + +Mintlify automatically hosts an `llms-full.txt` file at the root of your project. View your `llms-full.txt` by appending `/llms-full.txt` to your documentation site's URL. + +Open the llms-full.txt for this site + +Your site's `llms-full.txt` is always up to date and requires zero maintenance. diff --git a/ai/markdown-export.mdx b/ai/markdown-export.mdx new file mode 100644 index 000000000..61a63859f --- /dev/null +++ b/ai/markdown-export.mdx @@ -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. + +Open this page as Markdown + +## Keyboard shortcut + +Press Command + C (Ctrl + C on Windows) to copy a page as Markdown to your clipboard. diff --git a/docs.json b/docs.json index f80e6f23a..e4cc4a791 100644 --- a/docs.json +++ b/docs.json @@ -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" ] }, { @@ -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", @@ -487,6 +494,10 @@ { "source": "settings/authentication-personalization/personalization-setup/shared-session", "destination": "authentication-personalization/personalization-setup" + }, + { + "source": "ai-ingestion", + "destination": "ai/llmstxt" } ], "integrations": { diff --git a/guides/assistant.mdx b/guides/assistant.mdx index d2a4399ae..789f4f5d5 100644 --- a/guides/assistant.mdx +++ b/guides/assistant.mdx @@ -1,11 +1,11 @@ --- -title: "AI assistant" +title: "Assistant" description: "Help users succeed with your product and find answers faster" icon: "bot" --- - 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). ## About the assistant diff --git a/snippets/previewbutton.jsx b/snippets/previewbutton.jsx new file mode 100644 index 000000000..2c10604b0 --- /dev/null +++ b/snippets/previewbutton.jsx @@ -0,0 +1,7 @@ +export const PreviewButton = ({ children, href }) => { + return ( + + {children} + + ) + } \ No newline at end of file