Skip to content

Commit 1944215

Browse files
docs: document Markdown 404 recovery guidance and discovery headers (#7281)
Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
1 parent 716e447 commit 1944215

8 files changed

Lines changed: 94 additions & 4 deletions

File tree

ai/llmstxt.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ View your `llms.txt` by appending `/llms.txt` to your documentation site's URL.
2424

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

27-
Mintlify adds HTTP headers to every page response so AI tools can discover your `llms.txt` files and other agent resources without prior knowledge of their location:
27+
Mintlify adds HTTP headers to every response, including [Markdown responses](/ai/markdown-export) and 404 pages, so AI tools can discover your `llms.txt` files and other agent resources without prior knowledge of their location:
2828

2929
- `Link`: Follows the standard HTTP `Link` header format for resource discovery. Advertises `llms.txt`, `llms-full.txt`, your API catalog, [MCP server card](/ai/model-context-protocol#discovery-endpoint), [agent card](/ai/skillmd#agent-card), and [agent skills index](/ai/skillmd#skills-discovery-endpoints).
3030
- `X-Llms-Txt`: A convenience header for tools that check for `llms.txt` support.

ai/markdown-export.mdx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,27 @@ Send a request with `Accept: text/markdown` or `Accept: text/plain` to any page
2424
curl -L -H "Accept: text/markdown" https://mintlify.com/docs/ai/markdown-export
2525
```
2626

27+
## Missing pages
28+
29+
If you request a page that doesn't exist as Markdown, Mintlify returns a 404 status with a Markdown body that helps AI tools recover. The response links to your documentation index (`llms.txt`), your full documentation file (`llms-full.txt`), and up to three related pages based on the requested path.
30+
31+
```md Example Markdown 404 response
32+
> ## Documentation Index
33+
> Fetch the documentation index at: https://example.com/docs/llms.txt
34+
> Use this file to discover all available pages before exploring further.
35+
> For broader context, fetch the full documentation at: https://example.com/docs/llms-full.txt (large file).
36+
37+
# Page Not Found
38+
39+
The requested page could not be found.
40+
41+
## Related topics
42+
43+
- [Getting started](https://example.com/docs/getting-started.md)
44+
```
45+
46+
Related page suggestions come from the same search that powers your site's [404 page](/customize/custom-404-page). Sites that use [authentication](/deploy/authentication-setup) omit suggestions and return only the documentation links.
47+
2748
## Audience-specific content
2849

2950
Use the [visibility](/components/visibility) component to customize content for human and AI audiences.

es/ai/llmstxt.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Consulta tu `llms.txt` añadiendo `/llms.txt` a la URL de tu sitio de documentac
2424

2525
<PreviewButton href="https://mintlify.com/docs/llms.txt">Abrir el llms.txt de este sitio.</PreviewButton>
2626

27-
Mintlify añade encabezados HTTP a cada respuesta de página para que las herramientas de IA puedan descubrir tus archivos `llms.txt` y otros recursos para agentes sin conocer previamente su ubicación:
27+
Mintlify añade encabezados HTTP a cada respuesta, incluidas las [respuestas Markdown](/es/ai/markdown-export) y las páginas 404, para que las herramientas de IA puedan descubrir tus archivos `llms.txt` y otros recursos para agentes sin conocer previamente su ubicación:
2828

2929
- `Link`: Sigue el formato estándar del encabezado HTTP `Link` para el descubrimiento de recursos. Anuncia `llms.txt`, `llms-full.txt`, tu catálogo de API, [tarjeta del servidor MCP](/es/ai/model-context-protocol#discovery-endpoint), [tarjeta del agente](/es/ai/skillmd#agent-card) e [índice de skills del agente](/es/ai/skillmd#skills-discovery-endpoints).
3030
- `X-Llms-Txt`: Un encabezado de conveniencia para herramientas que verifican la compatibilidad con `llms.txt`.

es/ai/markdown-export.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,29 @@ Envía una solicitud con `Accept: text/markdown` o `Accept: text/plain` a la URL
2929
curl -L -H "Accept: text/markdown" https://mintlify.com/docs/ai/markdown-export
3030
```
3131

32+
<div id="missing-pages">
33+
## Páginas inexistentes
34+
</div>
35+
36+
Si solicitas en Markdown una página que no existe, Mintlify devuelve un estado 404 con un cuerpo Markdown que ayuda a las herramientas de IA a recuperarse. La respuesta enlaza al índice de tu documentación (`llms.txt`), a tu archivo de documentación completa (`llms-full.txt`) y hasta a tres páginas relacionadas según la ruta solicitada.
37+
38+
```md Example Markdown 404 response
39+
> ## Documentation Index
40+
> Fetch the documentation index at: https://example.com/docs/llms.txt
41+
> Use this file to discover all available pages before exploring further.
42+
> For broader context, fetch the full documentation at: https://example.com/docs/llms-full.txt (large file).
43+
44+
# Page Not Found
45+
46+
The requested page could not be found.
47+
48+
## Related topics
49+
50+
- [Getting started](https://example.com/docs/getting-started.md)
51+
```
52+
53+
Las sugerencias de páginas relacionadas provienen de la misma búsqueda que impulsa la [página 404](/es/customize/custom-404-page) de tu sitio. Los sitios que usan [autenticación](/es/deploy/authentication-setup) omiten las sugerencias y devuelven solo los enlaces de documentación.
54+
3255
<div id="audience-specific-content">
3356
## Contenido específico por audiencia
3457
</div>

fr/ai/llmstxt.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Affichez votre `llms.txt` en ajoutant `/llms.txt` à l'URL de votre site de docu
2424

2525
<PreviewButton href="https://mintlify.com/docs/llms.txt">Ouvrir le llms.txt de ce site.</PreviewButton>
2626

27-
Mintlify ajoute des en-têtes HTTP à chaque réponse de page afin que les outils d'IA puissent découvrir vos fichiers `llms.txt` et autres ressources d'agent sans connaître au préalable leur emplacement :
27+
Mintlify ajoute des en-têtes HTTP à chaque réponse, y compris les [réponses Markdown](/fr/ai/markdown-export) et les pages 404, afin que les outils d'IA puissent découvrir vos fichiers `llms.txt` et autres ressources d'agent sans connaître au préalable leur emplacement :
2828

2929
- `Link` : Suit le format standard de l'en-tête HTTP `Link` pour la découverte de ressources. Annonce `llms.txt`, `llms-full.txt`, votre catalogue d'API, la [carte du serveur MCP](/fr/ai/model-context-protocol#discovery-endpoint), l'[agent card](/fr/ai/skillmd#agent-card) et l'[index des agent skills](/fr/ai/skillmd#skills-discovery-endpoints).
3030
- `X-Llms-Txt` : Un en-tête pratique pour les outils qui vérifient la prise en charge de `llms.txt`.

fr/ai/markdown-export.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,29 @@ Envoyez une requête avec `Accept: text/markdown` ou `Accept: text/plain` à l'U
2929
curl -L -H "Accept: text/markdown" https://mintlify.com/docs/ai/markdown-export
3030
```
3131

32+
<div id="missing-pages">
33+
## Pages introuvables
34+
</div>
35+
36+
Si vous demandez en Markdown une page qui n'existe pas, Mintlify renvoie un statut 404 avec un corps Markdown qui aide les outils d'IA à se rétablir. La réponse renvoie vers l'index de votre documentation (`llms.txt`), votre fichier de documentation complète (`llms-full.txt`) et jusqu'à trois pages associées selon le chemin demandé.
37+
38+
```md Example Markdown 404 response
39+
> ## Documentation Index
40+
> Fetch the documentation index at: https://example.com/docs/llms.txt
41+
> Use this file to discover all available pages before exploring further.
42+
> For broader context, fetch the full documentation at: https://example.com/docs/llms-full.txt (large file).
43+
44+
# Page Not Found
45+
46+
The requested page could not be found.
47+
48+
## Related topics
49+
50+
- [Getting started](https://example.com/docs/getting-started.md)
51+
```
52+
53+
Les suggestions de pages associées proviennent de la même recherche que celle de la [page 404](/fr/customize/custom-404-page) de votre site. Les sites qui utilisent l'[authentification](/fr/deploy/authentication-setup) omettent les suggestions et ne renvoient que les liens de documentation.
54+
3255
<div id="audience-specific-content">
3356
## Contenu spécifique par audience
3457
</div>

zh/ai/llmstxt.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Mintlify 会在项目根目录自动托管一个 `llms.txt` 文件,列出文
2424

2525
<PreviewButton href="https://mintlify.com/docs/llms.txt">打开此站点的 llms.txt。</PreviewButton>
2626

27-
Mintlify 会在每个页面的响应中添加 HTTP 标头,以便 AI 工具无需事先知道位置即可发现你的 `llms.txt` 文件以及其他代理资源:
27+
Mintlify 会在每个响应中添加 HTTP 标头,包括 [Markdown 响应](/zh/ai/markdown-export)和 404 页面,以便 AI 工具无需事先知道位置即可发现你的 `llms.txt` 文件以及其他代理资源:
2828

2929
- `Link`:遵循标准 HTTP `Link` 标头格式,用于资源发现。会公布 `llms.txt``llms-full.txt`、你的 API 目录、[MCP 服务器卡片](/zh/ai/model-context-protocol#discovery-endpoint)[代理卡片](/zh/ai/skillmd#agent-card)以及[代理技能索引](/zh/ai/skillmd#skills-discovery-endpoints)
3030
- `X-Llms-Txt`:一个便捷标头,供检查 `llms.txt` 支持情况的工具使用。

zh/ai/markdown-export.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,29 @@ Mintlify 会自动生成针对 AI 工具和外部 integrations 优化的页面 M
2929
curl -L -H "Accept: text/markdown" https://mintlify.com/docs/ai/markdown-export
3030
```
3131

32+
<div id="missing-pages">
33+
## 不存在的页面
34+
</div>
35+
36+
如果你以 Markdown 形式请求一个不存在的页面,Mintlify 会返回 404 状态码以及一个帮助 AI 工具恢复的 Markdown 响应体。该响应包含指向文档索引(`llms.txt`)、完整文档文件(`llms-full.txt`)的链接,以及根据请求路径推荐的最多三个相关页面。
37+
38+
```md Example Markdown 404 response
39+
> ## Documentation Index
40+
> Fetch the documentation index at: https://example.com/docs/llms.txt
41+
> Use this file to discover all available pages before exploring further.
42+
> For broader context, fetch the full documentation at: https://example.com/docs/llms-full.txt (large file).
43+
44+
# Page Not Found
45+
46+
The requested page could not be found.
47+
48+
## Related topics
49+
50+
- [Getting started](https://example.com/docs/getting-started.md)
51+
```
52+
53+
相关页面建议来自为你站点 [404 页面](/zh/customize/custom-404-page)提供支持的同一搜索。使用[身份验证](/zh/deploy/authentication-setup)的站点会省略建议,仅返回文档链接。
54+
3255
<div id="audience-specific-content">
3356
## 面向特定受众的内容
3457
</div>

0 commit comments

Comments
 (0)