From a8f87ca92c8d752e001a339d734fc2ab01967054 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Sat, 2 May 2026 16:21:43 +0000
Subject: [PATCH] Translate prompt, api-catalog, and markdown access pages to
Chinese
---
.../zh/products/docs/pages/ai/api-catalog.mdx | 45 ++++
.../zh/products/docs/pages/ai/markdown.mdx | 43 ++++
.../default-components/prompt.mdx | 203 ++++++++++++++++++
3 files changed, 291 insertions(+)
create mode 100644 fern/translations/zh/products/docs/pages/ai/api-catalog.mdx
create mode 100644 fern/translations/zh/products/docs/pages/ai/markdown.mdx
create mode 100644 fern/translations/zh/products/docs/pages/component-library/default-components/prompt.mdx
diff --git a/fern/translations/zh/products/docs/pages/ai/api-catalog.mdx b/fern/translations/zh/products/docs/pages/ai/api-catalog.mdx
new file mode 100644
index 0000000000..f3d761976b
--- /dev/null
+++ b/fern/translations/zh/products/docs/pages/ai/api-catalog.mdx
@@ -0,0 +1,45 @@
+---
+title: API 目录发现
+sidebar-title: API 目录发现
+description: Fern 文档站点暴露了基于标准的 API 目录端点,让 AI 代理、MCP 客户端和 API 目录爬虫能够自动发现您的 API。
+---
+
+Fern 文档站点实现了 [RFC 9727](https://www.rfc-editor.org/rfc/rfc9727),让 AI 代理、MCP 客户端和 API 目录爬虫无需抓取 HTML 即可发现您的 API。该目录会根据可见的 [API 参考](/learn/docs/api-references/overview) 导航自动生成,并通过每个页面的 [`Link`](https://www.rfc-editor.org/rfc/rfc8288) 响应头公布——无需任何配置。通过 `hidden: true` 隐藏的引用(或所有端点都被隐藏的引用)会被排除在外。
+
+您的 API 目录位于 `your-documentation-site.com/.well-known/api-catalog`。例如,本站的目录位于 [buildwithfern.com/learn/.well-known/api-catalog](https://buildwithfern.com/learn/.well-known/api-catalog):
+
+```bash
+curl -s https://buildwithfern.com/learn/.well-known/api-catalog | jq .
+```
+
+对于带有 `/docs` 等基础路径的站点,目录会位于该基础路径下(例如 `https://example.com/docs/.well-known/api-catalog`)。
+
+## 响应格式
+
+该端点会返回一个列出每个可见 API 的 [Linkset 文档](https://www.rfc-editor.org/rfc/rfc9264)。每条记录包含:
+
+- **`anchor`** — 人类可读的 API 参考页面 URL
+- **`service-desc`** — 机器可读的 [OpenAPI 规范](/learn/docs/developer-tools/openapi-spec)
+- **`service-doc`** — 与 anchor 相同的参考页面
+
+```json title="响应示例"
+{
+ "linkset": [
+ {
+ "anchor": "https://example.docs.com/api-reference",
+ "service-desc": [
+ {
+ "href": "https://example.docs.com/openapi.yaml?api=abc123",
+ "type": "application/yaml"
+ }
+ ],
+ "service-doc": [
+ {
+ "href": "https://example.docs.com/api-reference",
+ "type": "text/html"
+ }
+ ]
+ }
+ ]
+}
+```
diff --git a/fern/translations/zh/products/docs/pages/ai/markdown.mdx b/fern/translations/zh/products/docs/pages/ai/markdown.mdx
new file mode 100644
index 0000000000..24a343f3c5
--- /dev/null
+++ b/fern/translations/zh/products/docs/pages/ai/markdown.mdx
@@ -0,0 +1,43 @@
+---
+title: Markdown 访问
+sidebar-title: Markdown 访问
+description: 通过单页 URL、`llms.txt` 和 `llms-full.txt` 以 Markdown 形式访问您的文档,便于 AI 代理和工具使用。
+---
+
+
+Fern 会以干净的 Markdown 形式提供任意文档页面(包括 API 参考页面),方便代理高效消费您的内容。代理可以通过在页面 URL 后追加 `.md` 或 `.mdx`,或通过 [内容协商](https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation) 发送 `Accept: text/markdown` 请求头来获取源内容。结合 [`llms.txt`](/learn/docs/ai-features/llms-txt),相比 HTML 可减少 90% 以上的 token 消耗。
+
+
+
+
+
+同一份 Markdown 在所有场景中通用——单页、`llms.txt` 和 `llms-full.txt`——并遵循相同的 `` 与 `` 内容控制规则。
+
+每个页面在向 AI 代理输出 Markdown 时,都会自动附加一个 [默认的逐页指令](/learn/docs/ai-features/agent-directives),引导它们访问您的 `.md` URL、`llms.txt` 和 `llms-full.txt`。您可以在 `docs.yml` 中 [覆盖或停用该指令](/learn/docs/configuration/site-level-settings#agents-configuration)。该指令仅对代理可见,不会影响面向用户的文档展示。
+
+## 访问受保护的文档
+
+在启用了 [身份验证](/learn/docs/authentication/overview) 的站点上,无论代理请求的是单个页面、`llms.txt` 还是 `llms-full.txt`,每次请求都必须携带 JWT。请使用您的 [Fern token](/learn/cli-api/cli-reference/commands#fern-token) 换取一个 [JWT](/learn/docs/fern-api-reference/get-jwt):
+
+```bash 获取 JWT
+curl https://docs.example.com/api/fern-docs/get-jwt \
+ -H "FERN_API_KEY: $FERN_TOKEN"
+# → { "fern_token": "eyJ...", "roles": [] }
+```
+
+将返回的 JWT 作为 `FERN_TOKEN` 请求头附在后续请求上:
+
+```bash 获取受保护内容
+curl https://docs.example.com/platform/overview \
+ -H 'Accept: text/markdown' \
+ -H "FERN_TOKEN: $JWT"
+```
+
+JWT 的有效期为 30 天——请按需缓存并刷新。
+
+## 用 Markdown 进行排错
+
+直接查看 Markdown 也有助于排查布局问题。**View as Markdown** 按钮在每个页面上默认启用,可通过 [页面操作配置](/learn/docs/configuration/site-level-settings#page-actions-configuration) 进行调整。
diff --git a/fern/translations/zh/products/docs/pages/component-library/default-components/prompt.mdx b/fern/translations/zh/products/docs/pages/component-library/default-components/prompt.mdx
new file mode 100644
index 0000000000..d52cb4023b
--- /dev/null
+++ b/fern/translations/zh/products/docs/pages/component-library/default-components/prompt.mdx
@@ -0,0 +1,203 @@
+---
+title: 提示词组件
+sidebar-title: 提示词组件
+description: 显示一个可复制的提示词,并可附带在 Cursor、Claude、ChatGPT 等 AI 工具中“打开”的操作按钮。
+---
+
+`` 组件用于展示 AI 提示词卡片,包含图标、多行提示词预览、复制按钮以及可选的“打开方式”操作按钮(适用于各类 AI 工具)。将其添加到任意页面,读者就能复制相关说明,或直接在 Cursor、Claude 或 ChatGPT 中打开它们。
+
+适用于教程、快速上手、迁移指南,或任何希望读者将任务交给 AI 助手的页面——例如搭建项目脚手架、生成 SDK 或应用代码改动。
+
+复制或打开提示词时,会保留其原有的 Markdown 格式。
+
+## 用法
+
+默认情况下,`` 会渲染一个星光图标、提示词文本和一个复制按钮。当未设置标题时,操作按钮会内联显示。
+
+
+
+
+ 你是一名 **文档搭建助手**。请帮助用户创建并发布一个新的文档站点。
+
+ 按步骤参考 [快速上手指南](https://buildwithfern.com/learn/docs/getting-started/quickstart.md)。
+
+
+
+
+```jsx Markdown
+
+你是一名 **文档搭建助手**。请帮助用户创建并发布一个新的文档站点。
+
+按步骤参考 [快速上手指南](https://buildwithfern.com/learn/docs/getting-started/quickstart.md)。
+
+```
+
+## 变体
+
+### 带标题
+
+设置 `title` 属性可以在提示词栏上方添加标题行。设置标题后,操作按钮会移动到标题行中。
+
+
+
+
+ 根据我的 OpenAPI 规范生成一个 TypeScript SDK。请参照 [TypeScript SDK 快速上手](https://buildwithfern.com/learn/sdks/generators/typescript/quickstart.md)。
+
+
+
+
+```jsx Markdown
+
+根据我的 OpenAPI 规范生成一个 TypeScript SDK。请参照 [TypeScript SDK 快速上手](https://buildwithfern.com/learn/sdks/generators/typescript/quickstart.md)。
+
+```
+
+### 单个“打开方式”操作
+
+设置 `actions` 属性可添加按钮,将提示词直接在 AI 工具中打开。可用值:`cursor`、`claude`、`chatgpt`。
+
+
+
+
+ 根据我的 OpenAPI 规范生成一个 TypeScript SDK。请参照 [TypeScript SDK 快速上手](https://buildwithfern.com/learn/sdks/generators/typescript/quickstart.md)。
+
+
+
+
+```jsx Markdown
+
+根据我的 OpenAPI 规范生成一个 TypeScript SDK。请参照 [TypeScript SDK 快速上手](https://buildwithfern.com/learn/sdks/generators/typescript/quickstart.md)。
+
+```
+
+### 多个“打开方式”操作
+
+当指定多个操作时,第一个会作为主按钮,其余的可通过下拉菜单访问。
+
+
+
+
+ 根据我的 OpenAPI 规范生成一个 TypeScript SDK。请参照 [TypeScript SDK 快速上手](https://buildwithfern.com/learn/sdks/generators/typescript/quickstart.md)。
+
+
+
+
+```jsx Markdown
+
+根据我的 OpenAPI 规范生成一个 TypeScript SDK。请参照 [TypeScript SDK 快速上手](https://buildwithfern.com/learn/sdks/generators/typescript/quickstart.md)。
+
+```
+
+### 自定义图标
+
+将 `icon` 属性设置为 Font Awesome 图标名或图片 URL。
+
+
+
+
+ 根据我的 OpenAPI 规范生成一个 TypeScript SDK。请参照 [TypeScript SDK 快速上手](https://buildwithfern.com/learn/sdks/generators/typescript/quickstart.md)。
+
+
+
+
+```jsx Markdown
+
+根据我的 OpenAPI 规范生成一个 TypeScript SDK。请参照 [TypeScript SDK 快速上手](https://buildwithfern.com/learn/sdks/generators/typescript/quickstart.md)。
+
+```
+
+### 单行模式
+
+设置 `singleLine` 可将提示词正文截断为单行并以省略号结尾。这对紧凑的内联预览非常有用。
+
+
+
+
+ 根据我的 OpenAPI 规范生成一个 TypeScript SDK。请参照 [TypeScript SDK 快速上手](https://buildwithfern.com/learn/sdks/generators/typescript/quickstart.md)。
+
+
+
+
+```jsx Markdown
+
+根据我的 OpenAPI 规范生成一个 TypeScript SDK。请参照 [TypeScript SDK 快速上手](https://buildwithfern.com/learn/sdks/generators/typescript/quickstart.md)。
+
+```
+
+### 隐藏提示词正文
+
+设置 `hidePrompt` 可完全隐藏提示词正文区域,仅显示带复制和“打开方式”操作的标题行。当提示词较长且只想展示概要视图时,这一属性很有用。
+
+
+
+
+ 根据我的 OpenAPI 规范生成一个 TypeScript SDK。请参照 [TypeScript SDK 快速上手](https://buildwithfern.com/learn/sdks/generators/typescript/quickstart.md)。
+
+
+
+
+```jsx Markdown
+
+根据我的 OpenAPI 规范生成一个 TypeScript SDK。请参照 [TypeScript SDK 快速上手](https://buildwithfern.com/learn/sdks/generators/typescript/quickstart.md)。
+
+```
+
+## 属性
+
+
+ 以 Markdown 格式书写的提示词文本。该内容会显示在提示词正文中、复制到剪贴板,或发送给所选的 AI 工具,并保留原有的 Markdown 格式。
+
+
+
+ 显示在提示词栏上方的标题。
+
+
+
+ 显示在提示词文本左侧的 [Font Awesome 图标](/learn/docs/writing-content/components/icons) 名称或图片 URL。未设置时默认使用星光图标。
+
+
+
+ 要显示的“打开方式”操作按钮。可用值:`cursor`、`claude`、`chatgpt`。第一个操作会渲染为主按钮,其他操作可通过下拉菜单访问。无论该属性如何设置,复制按钮始终存在。
+
+
+
+ 隐藏提示词正文区域,仅显示带复制和“打开方式”操作的标题行。需要同时设置 `title`。
+
+
+
+ 强制以单行截断并显示省略号的预览方式呈现提示词。当为 `false`(默认值)时,提示词正文会自动换行,最多显示五行并支持垂直滚动。
+