Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
35 changes: 14 additions & 21 deletions ai-ingestion.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "AI ingestion"
description: "Prepare your documentation for LLMs and AI tools"

Check warning on line 3 in ai-ingestion.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai-ingestion.mdx#L3

Did you really mean 'LLMs'?
icon: "bot-message-square"
---

Expand All @@ -12,24 +12,19 @@
)
}

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.

Check warning on line 15 in ai-ingestion.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai-ingestion.mdx#L15

Did you really mean 'LLMs'?

## 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.
- **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.

<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."
/>
![The expanded contextual menu showing the Copy page, View as Markdown, Open in ChatGPT, and Open in Claude menu items.](/images/contextual-menu/contextual-menu.png)
</Frame>

### Enabling the contextual menu
Expand All @@ -42,8 +37,8 @@
"options": [
"copy",
"view",
"chatgpt",

Check warning on line 40 in ai-ingestion.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai-ingestion.mdx#L40

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

Check warning on line 41 in ai-ingestion.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai-ingestion.mdx#L41

Did you really mean 'claude'?
"perplexity"
]
}
Expand All @@ -68,20 +63,18 @@

<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>
Expand All @@ -92,7 +85,7 @@

Example custom option:

```json {7-20} Example with Perplexity icon="search"
```json Example with Perplexity {7,8,9,10,11,12,13,14,15,16,17,18,19,20} icon=search
"contextual": {
"options": [
"copy",
Expand Down Expand Up @@ -123,26 +116,26 @@

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.

<PreviewButton href="https://mintlify.com/docs/llms.txt">Open llms.txt for this site</PreviewButton>
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.

<PreviewButton href="https://mintlify.com/docs/llms-full.txt">Open llms-full.txt for this site</PreviewButton>
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.
Add a `.md` to a page's URL to display a Markdown version of that page.

<PreviewButton href="https://mintlify.com/docs/quickstart.md">Open quickstart.md</PreviewButton>
Open quickstart.md

### Command \+ C shortcut

Select Command \+ C (Ctrl \+ C on Windows) to copy any page as Markdown.
Select Command \+ C (Ctrl \+ C on Windows) to copy any page as Markdown.
12 changes: 6 additions & 6 deletions code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

You can add inline code snippets or code blocks. Code blocks support meta options for syntax highlighting, titles, line highlighting, icons, and more.

### Inline code
### Hello world

To denote a `word` or `phrase` as code, enclose it in backticks (\`).

Expand All @@ -22,7 +22,7 @@

Specify the programming language for syntax highlighting and to enable meta options. Add any meta options, like a title or icon, after the language.

```java HelloWorld.java lines icon="java"
```java HelloWorld.java icon=java lines
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
Expand Down Expand Up @@ -57,7 +57,7 @@

Enable syntax highlighting by specifying the programming language after the opening backticks of a code block.

We use [Shiki](https://shiki.style/) for syntax highlighting and support all available languages. See the full list of [languages](https://shiki.style/languages) in Shiki's documentation.

Check warning on line 60 in code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

code.mdx#L60

Did you really mean 'Shiki's'?

```java
class HelloWorld {
Expand Down Expand Up @@ -95,7 +95,7 @@

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.

```javascript icon="square-js"
```javascript icon=square-js
const hello = "world";
```

Expand All @@ -109,7 +109,7 @@

Highlight specific lines in your code blocks using `highlight` with the line numbers or ranges you want to highlight.

```javascript Line Highlighting Example highlight= {1-2,5}
```javascript Line Highlighting Example {1,2,5}
const greeting = "Hello, World!";
function sayHello() {
console.log(greeting);
Expand All @@ -131,7 +131,7 @@

Focus on specific lines in your code blocks using `focus` with line numbers or ranges.

```javascript Line Focus Example focus= {2,4-5}
```javascript Line Focus Example focus=2,4,5
const greeting = "Hello, World!";
function sayHello() {
console.log(greeting);
Expand Down Expand Up @@ -304,7 +304,7 @@

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]`.

```js Diff Example icon="code" lines
```js Diff Example icon=code lines
const greeting = "Hello, World!"; // [!code ++]
function sayHello() {
console.log("Hello, World!"); // [!code --]
Expand Down
Loading