mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
d8231d19b5
Generated-By: mintlify-agent Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
37 lines
1.3 KiB
Plaintext
37 lines
1.3 KiB
Plaintext
---
|
||
title: "Markdown 导出"
|
||
description: "快速获取页面的 Markdown 版本,便于 AI 工具和 integrations 使用。"
|
||
keywords: ["markdown", "token 效率", "AI 处理"]
|
||
---
|
||
|
||
import { PreviewButton } from "/snippets/previewbutton.jsx"
|
||
|
||
与 HTML 相比,Markdown 提供的结构化文本更便于 AI 工具高效处理,从而带来更高的响应准确性、更快的处理速度,以及更低的 token 使用量。
|
||
|
||
Mintlify 会自动生成针对 AI 工具和外部 integrations 优化的页面 Markdown 版本。
|
||
|
||
|
||
<div id="md-url-extension">
|
||
## .md URL 后缀
|
||
</div>
|
||
|
||
在任意页面的 URL 末尾添加 `.md`,即可查看其 Markdown 版本。
|
||
|
||
<PreviewButton href="https://mintlify.com/docs/ai/markdown-export.md">以 Markdown 打开此页面</PreviewButton>
|
||
|
||
<div id="accept-header">
|
||
## Accept 标头
|
||
</div>
|
||
|
||
向任意页面 URL 发送带有 `Accept: text/markdown` 或 `Accept: text/plain` 的请求,即可接收 Markdown 版本而非 HTML。这对于以编程方式获取文档内容的 AI 工具和 integrations 非常有用。
|
||
|
||
```bash
|
||
curl -H "Accept: text/markdown" https://mintlify.com/docs/ai/markdown-export
|
||
```
|
||
|
||
<div id="keyboard-shortcut">
|
||
## 键盘快捷键
|
||
</div>
|
||
|
||
按 <kbd>Command</kbd> + <kbd>C</kbd>(在 Windows 上为 <kbd>Ctrl</kbd> + <kbd>C</kbd>)将页面以 Markdown 格式复制到剪贴板。
|