diff --git a/ai-ingestion.mdx b/ai-ingestion.mdx index 0312c1d58..7bef3b675 100644 --- a/ai-ingestion.mdx +++ b/ai-ingestion.mdx @@ -14,22 +14,17 @@ export const PreviewButton = ({ children, href }) => { 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. +- **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. + ![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) ### Enabling the contextual menu @@ -68,12 +63,11 @@ 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. - + The base URL for the option. - The query parameters for the option. @@ -81,7 +75,6 @@ Create custom options in the contextual menu by adding an object to the `options 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. @@ -92,7 +85,7 @@ Create custom options in the contextual menu by adding an object to the `options 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", @@ -123,7 +116,7 @@ The [/llms.txt file](https://llmstxt.org) is an industry standard that helps gen 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 +Open llms.txt for this site ## /llms-full.txt @@ -131,7 +124,7 @@ The `/llms-full.txt` file combines your entire documentation site into a single Every documentation site automatically hosts an `/llms-full.txt` file at the root. -Open llms-full.txt for this site +Open llms-full.txt for this site ## Generating Markdown versions of pages @@ -139,10 +132,10 @@ Markdown provides structured text that AI tools can process more efficiently tha ### .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. -Open quickstart.md +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. \ No newline at end of file diff --git a/code.mdx b/code.mdx index 474cad172..d8e06ae75 100644 --- a/code.mdx +++ b/code.mdx @@ -8,7 +8,7 @@ icon: "code" 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 (\`). @@ -22,7 +22,7 @@ Use [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-c 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!"); @@ -95,7 +95,7 @@ const hello = "world"; 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"; ``` @@ -109,7 +109,7 @@ const hello = "world"; 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); @@ -131,7 +131,7 @@ sayHello(); 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); @@ -304,7 +304,7 @@ sayHello(); 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 --]