setMenuOpen(false)}
+ />
+ )}
+
+ );
+}
+```
+
+
+`useEffect` hook 注入了一个 CSS 规则,目标是 `#fern-sidebar[data-viewport="mobile"]` 和 `#fern-sidebar-overlay` 来隐藏 Fern 的默认移动端侧边栏。这可以防止内置的滑动打开手势显示 Fern 的侧边栏,因此您的自定义面板是唯一的移动端导航。
+
+
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/customization/custom-react-components.mdx b/fern/translations/zh-CN/products/docs/pages/customization/custom-react-components.mdx
new file mode 100644
index 0000000000..c7e67d0786
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/customization/custom-react-components.mdx
@@ -0,0 +1,84 @@
+---
+title: 自定义 React 组件
+description: 向您的 Fern 文档添加自定义 React 组件,创建交互式、服务端渲染的元素。通过可重用组件提升 SEO、性能和用户体验。
+slug: customization/custom-react-components
+sidebar-title: 自定义 React 组件
+---
+
+您可以通过添加自定义 React 组件来扩展 Fern 的内置组件库。这允许您创建符合文档需求的独特交互式元素。组件采用服务端渲染,具有更好的 SEO 和性能表现,且不会出现布局偏移。
+
+
+ 不要使用 React 组件来定义常量。请考虑使用[可重用片段](/docs/writing-content/reusable-snippets)。
+
+
+## MDX 中的自定义组件
+
+
+ ### 创建 React 组件
+
+ 让我们首先创建一个 `components` 文件夹,您可以在其中定义 React 组件。请注意,React 组件可以在 `.ts`、`.tsx`、`.js` 或 `.mdx` 文件中定义。
+
+ ```ts components/CustomCard.tsx
+ export const CustomCard = ({ title, text, link, sparkle = false }) => {
+ return (
+
+
+ {title} {sparkle && "✨"}
+
+ {text}
+
+ );
+ };
+ ```
+
+ ### 在文档中使用组件
+
+ 编写好组件后,您可以使用相对路径或 `@/` 前缀(从 fern 文件夹根目录开始的绝对路径)在 Markdown 指南中导入它:
+
+ ```jsx guide.mdx
+// 从 fern 文件夹根目录开始的绝对路径
+import { CustomCard } from "@/components/CustomCard"
+
+// 或使用相对路径
+import { CustomCard } from "../components/CustomCard"
+
+
+ ```
+
+ `@/` 前缀解析为 fern 文件夹的根目录,因此 `@/components/CustomCard` 指向 `fern/components/CustomCard`。这对于嵌套的 MDX 文件很有用,因为相对路径会很麻烦(例如 `../../../components/CustomCard`)。两种导入方式在发布时都会自动转换为相对路径。
+
+ ### 在 `docs.yml` 中指定组件目录
+
+ 在 `docs.yml` 中添加您的组件目录,这样 Fern CLI 就可以扫描您的组件目录并将它们上传到服务器。
+
+ ```yml docs.yml
+ experimental:
+ mdx-components:
+ - ./components
+ ```
+
+
+## 为什么不直接使用自定义 CSS 和 JS?
+
+虽然您可以将 React 组件打包为自定义 JavaScript,但使用 Fern 内置的 React 组件支持提供了几个关键优势:
+
+
+
+ 通过自定义 JavaScript 添加 React 组件时,您无法控制组件相对于页面其他内容的渲染时机。这通常会导致故障行为,组件在主内容加载后异步加载时会出现闪烁或跳跃。
+
+
+
+ 自定义 JavaScript 包通常包含自己的 React 库副本,这会:
+ - 通过重复已包含的 React 代码增加页面加载时间
+ - 由于多个 React 实例在同一页面上运行而降低性能
+ - 创建用户必须下载的更大包体积
+
+
+
+ 自定义 React 组件采用服务端渲染,完全可被搜索引擎索引,而通过自定义 JavaScript 添加的组件不采用服务端渲染,无法被索引。
+
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/customization/embedded-mode.mdx b/fern/translations/zh-CN/products/docs/pages/customization/embedded-mode.mdx
new file mode 100644
index 0000000000..3a1f3ef0e3
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/customization/embedded-mode.mdx
@@ -0,0 +1,29 @@
+---
+title: 嵌入模式
+subtitle: 在 iframe 或仪表板中嵌入文档时隐藏页头和页脚
+sidebar-title: 嵌入模式
+---
+
+嵌入模式会从文档页面中移除页头和页脚,使其适合嵌入到 iframe、仪表板或其他只想显示内容的环境中。
+
+## 启用嵌入模式
+
+在任何文档 URL 中添加 `embedded=true` 查询参数:
+
+```
+https://docs.example.com/getting-started?embedded=true
+```
+
+启用时,页头(包括导航和标志)和页脚将被隐藏,主要内容区域会调整以填充可用空间。
+
+## 持久性
+
+一旦激活嵌入模式,它会在同一会话的导航事件中保持持久。用户可以在页面之间导航,无需在每个 URL 中添加查询参数。
+
+## 使用场景
+
+嵌入模式在以下情况下很有用:
+
+- 在产品仪表板或管理面板中显示文档
+- 在 iframe 中嵌入文档时创建无缝体验
+- 显示文档内容而不显示标准导航框架
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/customization/global-themes.mdx b/fern/translations/zh-CN/products/docs/pages/customization/global-themes.mdx
new file mode 100644
index 0000000000..29cb9be4bc
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/customization/global-themes.mdx
@@ -0,0 +1,125 @@
+---
+title: 全局主题
+subtitle: 在多个文档站点之间共享一致的视觉标识。
+description: 了解如何使用全局主题在一个存储库中定义品牌标识,并在子文档站点中自动应用。
+sidebar-title: 全局主题
+---
+
+全局主题允许单个"控制"存储库为您组织的文档定义共享的视觉标识(logo、颜色、字体、布局、CSS、JS 等)。子存储库通过名称引用主题,并在发布时自动继承这些设置。
+
+当您的组织维护多个应该共享相同品牌标识的文档站点时,这非常有用。
+
+## 设置全局主题
+
+
+
+
+
+从定义您规范品牌标识的存储库中,[导出](/learn/cli-api-reference/cli-reference/commands#fern-docs-theme-export)主题:
+
+```bash
+fern docs theme export
+```
+
+这会从您的 `docs.yml` 中读取符合主题条件的字段,并生成一个 `theme.yml` 文件以及在 `fern/theme/` 目录中的所有本地资源(logo、字体、CSS、JS)的副本。
+
+使用 `--output` 指定不同的目录:
+
+```bash
+fern docs theme export --output ./my-theme
+```
+
+
+
+
+
+[上传](/learn/cli-api-reference/cli-reference/commands#fern-docs-theme-upload)导出的主题到 Fern 注册表:
+
+```bash
+fern docs theme upload --name my-theme
+```
+
+这会上传主题配置和所有引用的文件资源。如果您省略 `--name`,主题将保存为 `default`。
+
+
+
+
+
+[列出](/learn/cli-api-reference/cli-reference/commands#fern-docs-theme-list)您组织的所有主题:
+
+```bash
+fern docs theme list
+```
+
+使用 `--json` 获取包含 `updatedAt` 时间戳的机器可读输出:
+
+```bash
+fern docs theme list --json
+```
+
+
+
+
+
+在子存储库的 `docs.yml` 中,添加:
+
+```yaml docs.yml
+global-theme: my-theme
+```
+
+
+
+
+
+从子存储库运行标准的[发布命令](/learn/cli-api-reference/cli-reference/commands#fern-generate---docs):
+
+```bash
+fern generate --docs
+```
+
+CLI 从 Fern 注册表获取指定的主题,下载任何文件资源,将主题合并到本地 `docs.yml` 配置中,并发布合并后的结果。无需额外步骤。
+
+
+
+
+
+## 主题控制的内容
+
+当应用全局主题时,主题的值优先于子存储库 `docs.yml` 中的品牌字段,而子存储库保留对其内容和结构的控制权。在子存储库中,只编辑由子存储库拥有的字段 — 您对主题拥有字段的任何本地更改在发布时主题合并时会被覆盖。
+
+
+| 字段 | 所有者 | 描述 |
+| --- | --- | --- |
+| [`logo`](/learn/docs/configuration/site-level-settings#logo-configuration) | 主题 | 品牌 logo 图像和链接 |
+| [`favicon`](/learn/docs/configuration/site-level-settings#favicon) | 主题 | 浏览器标签图标 |
+| [`background-image`](/learn/docs/configuration/site-level-settings#background-image-configuration) | 主题 | 页面背景 |
+| [`colors`](/learn/docs/configuration/site-level-settings#colors-configuration) | 主题 | 强调色和背景色 |
+| [`typography`](/learn/docs/configuration/site-level-settings#typography-configuration) | 主题 | 正文、标题和代码字体 |
+| [`layout`](/learn/docs/configuration/site-level-settings#layout-configuration) | 主题 | 侧边栏宽度、内容宽度、标签页和搜索栏位置 |
+| [`theme`](/learn/docs/configuration/site-level-settings#theme-configuration) | 主题 | 明暗模式默认值 |
+| [`settings`](/learn/docs/configuration/site-level-settings#settings-configuration) | 主题 | 显示设置 |
+| [`integrations`](/learn/docs/configuration/site-level-settings#integrations-configuration) | 主题 | 分析和追踪 |
+| [`css`](/learn/docs/customization/custom-css-js) | 主题 | 自定义样式表 |
+| [`js`](/learn/docs/customization/custom-css-js) | 主题 | 自定义脚本 |
+| [`header`](/learn/docs/configuration/site-level-settings#header) | 主题 | 自定义头部组件 |
+| [`footer`](/learn/docs/configuration/site-level-settings#footer) | 主题 | 自定义页脚组件 |
+| [`navbar-links`](/learn/docs/configuration/site-level-settings#navbar-links-configuration) | 主题 | 顶部导航链接 |
+| [`footer-links`](/learn/docs/configuration/site-level-settings#footer-links-configuration) | 主题 | 页脚导航链接 |
+| [`ai-search`](/learn/docs/configuration/site-level-settings#ask-fern-configuration) | 主题 | AI 搜索配置 |
+| [`announcement`](/learn/docs/customization/announcement-banner) | 主题 | 公告横幅 |
+| [`metadata`](/learn/docs/configuration/site-level-settings#seo-metadata-configuration) | 主题 | SEO 元数据 |
+| [`navigation`](/learn/docs/configuration/navigation) | 子存储库 | 标签页、章节、页面 |
+| [`apis`](/learn/docs/api-references/overview) | 子存储库 | API 参考 |
+| [`redirects`](/learn/docs/configuration/site-level-settings#redirects-configuration) | 子存储库 | 重定向 |
+| [`versions`](/learn/docs/configuration/versions) | 子存储库 | 版本 |
+| [`instances`](/learn/docs/configuration/site-level-settings#instances-configuration) | 子存储库 | 域名和 URL |
+
+
+## 更新主题
+
+要更新主题,请对控制存储库的 `docs.yml` 进行更改,重新导出,并使用相同名称重新上传。下次子存储库发布时,它会自动获取更新的主题。
+
+```bash
+fern docs theme export
+fern docs theme upload --name my-theme
+```
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/customization/hiding-content-example.mdx b/fern/translations/zh-CN/products/docs/pages/customization/hiding-content-example.mdx
new file mode 100644
index 0000000000..86ff42e8f6
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/customization/hiding-content-example.mdx
@@ -0,0 +1,10 @@
+---
+title: 隐藏页面示例
+sidebar-title: 隐藏页面示例
+noindex: true
+---
+
+
+你找到了!这个页面通过在 `docs.yml` 中设置 `hidden: true` 从侧边栏和搜索结果中隐藏。只能通过直接 URL 访问。
+
+要了解如何在你自己的文档中隐藏内容,请参阅[隐藏内容](/learn/docs/customization/hiding-content)。
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/customization/hiding-content.mdx b/fern/translations/zh-CN/products/docs/pages/customization/hiding-content.mdx
new file mode 100644
index 0000000000..6686b17f2d
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/customization/hiding-content.mdx
@@ -0,0 +1,137 @@
+---
+title: 在站点中隐藏内容
+description: 通过从侧边栏和搜索结果中隐藏页面、章节、选项卡、选项卡变体、版本和 API 端点来控制内容的可见性。
+sidebar-title: 在站点中隐藏内容
+---
+
+Fern 为您提供了两个主要工具来控制内容可见性:在 `docs.yml` 中设置 `hidden: true` 可以从站点侧边栏和搜索结果中移除内容,而在页面前言中设置 `noindex: true` 可以在不影响导航的情况下将页面从搜索中排除。
+
+## 隐藏页面
+
+### 仅通过直接 URL 访问
+
+在 `docs.yml` 中设置 `hidden: true` 可以从侧边栏、搜索结果和 [llms.txt](/learn/docs/ai-features/llms-txt) 中移除页面,同时保持通过直接链接访问。这对于与审核人员分享草稿文档或从外部工具(如支持工单)进行链接很有用。无需同时设置 `noindex` — `hidden: true` 会自动处理两者。
+
+```yaml title="docs.yml" {4}
+navigation:
+ - section: Introduction
+ contents:
+ - page: My Page
+ path: ./pages/my-page.mdx
+ - page: Hide and Seek
+ hidden: true
+ path: ./pages/hide-and-seek.mdx
+ - api: API Reference
+```
+
+
+此页面在侧边栏和搜索引擎中隐藏,但您可以通过直接链接访问。
+
+
+### 仅从搜索中排除
+
+在页面前言中设置 `noindex: true` 可以将其从搜索引擎和 [llms.txt](/learn/docs/ai-features/llms-txt) 中排除,同时保持在站点上的可发现性。这对于早期访问文档或您希望读者通过导航而非搜索或 AI 工具找到的内容很有用。
+
+```mdx title="early-access-feature.mdx" {3}
+---
+title: Early access feature
+noindex: true
+---
+```
+
+有关更多 SEO 相关选项,请参见 [SEO 元数据](/learn/docs/seo/setting-seo-metadata)。
+
+## 隐藏 API 端点
+
+在 `docs.yml` 中的端点布局配置中设置 `hidden: true` 可以将其从侧边栏中隐藏。与页面级别的 `hidden` 一样,隐藏的端点会自动从搜索引擎索引中排除,因此无需设置 `noindex: true`。
+
+```yaml title="docs.yml" {6}
+navigation:
+ - api: API Reference
+ layout:
+ - plants:
+ - endpoint: POST /plants/{plantId}
+ hidden: true
+```
+
+有关完整配置详情,包括 OpenAPI、Fern Definition 和 WebSocket 端点的示例,请参见[隐藏端点](/learn/docs/api-references/customize-api-reference-layout#hiding-endpoints)。
+
+## 隐藏章节、选项卡、选项卡变体或版本
+
+从导航中隐藏整个[章节](/learn/docs/configuration/navigation)、[选项卡](/learn/docs/configuration/tabs)、[选项卡变体](/learn/docs/configuration/tabs#tab-variants)或[版本](/learn/docs/configuration/versions) — 例如,旧版 API、内部选项卡或内部工具文档章节。
+
+与隐藏页面或端点不同,隐藏章节、选项卡、选项卡变体或版本只会从导航中移除组。其中的单个页面仍然会被搜索引擎和 AI 索引,因为 `hidden` 应用于组,而不是每个页面。要同时从搜索结果中排除单个页面,请在每个页面的前言中添加 `noindex: true`。
+
+
+
+```yaml title="docs.yml" {8}
+navigation:
+ - section: Introduction
+ contents:
+ - page: My Page
+ path: ./pages/my-page.mdx
+ - api: API Reference
+ - section: Hidden Section
+ hidden: true
+ contents:
+ - page: Hide and Seek
+ path: ./pages/hide-and-seek.mdx
+```
+
+
+
+
+
+
+```yaml title="docs.yml" {3}
+navigation:
+ - tab: api
+ hidden: true
+ layout:
+ - section: API Reference
+ contents:
+ - page: Plant endpoints
+ path: ./pages/plant-endpoints.mdx
+ - tab: help
+ layout:
+ - section: Help center
+ contents:
+ - page: Contact us
+ path: ./pages/contact-us.mdx
+```
+
+
+```yaml title="docs.yml" {5}
+navigation:
+ - tab: help
+ variants:
+ - title: For developers
+ hidden: true
+ layout:
+ - section: Getting started
+ contents:
+ - page: Quick start
+ path: ./pages/dev-quickstart.mdx
+ - title: For product managers
+ layout:
+ - section: Getting started
+ contents:
+ - page: Overview
+ path: ./pages/pm-overview.mdx
+```
+
+
+```yaml title="docs.yml" {8}
+versions:
+ - display-name: v3
+ path: ./versions/v3.yml
+ - display-name: v2
+ path: ./versions/v2.yml
+ - display-name: v1 (Legacy)
+ path: ./versions/v1.yml
+ hidden: true
+```
+
+默认版本(版本列表中的第一个版本)不能隐藏。
+
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/customization/search.mdx b/fern/translations/zh-CN/products/docs/pages/customization/search.mdx
new file mode 100644
index 0000000000..97f25087c1
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/customization/search.mdx
@@ -0,0 +1,101 @@
+---
+title: 搜索配置
+description: 使用 Algolia DocSearch 为您的 Fern 文档配置搜索。了解搜索过滤器如何工作、结果排名机制,以及如何与 Algolia 集成。
+sidebar-title: 搜索配置
+---
+
+Fern 使用 [Algolia DocSearch](https://docsearch.algolia.com/) 为您的文档提供搜索功能。
+DocSearch 专为文档站点设计,帮助用户找到所需内容。
+
+## 搜索工作原理
+
+DocSearch 扫描您的 Fern 站点内容并构建索引以生成搜索结果。
+它包含内置的下拉过滤器,这些过滤器会根据您站点的配置动态显示,让用户精细化搜索:
+
+- **产品:** 将结果限定为文档中的特定产品(适用于有多个[产品](/learn/docs/configuration/products)的站点)
+- **版本:** 按文档版本过滤结果(适用于使用[版本文档](/learn/docs/configuration/versions)的站点)
+- **内容类型:** 按指南、更新日志条目或 API 端点过滤结果
+- **API 类型:** 按协议(HTTP、webhooks、WebSockets 或 gRPC)过滤 API 结果
+- **HTTP 方法:** 按 HTTP 方法(`GET`、`POST`、`PUT`、`DELETE` 等)过滤 API 结果
+- **状态码:** 按 HTTP 状态码过滤 API 结果
+- **可用性:** 按可用性状态过滤 API 结果,包括稳定版、测试版和已弃用
+
+
+
+
+
+Fern 可以将搜索范围限定为用户当前的上下文。对于具有多个产品或版本的站点,请在您的 `docs.yml` 中设置 [`default-search-filters: true`](/learn/docs/configuration/site-level-settings#settingsdefault-search-filters),以将结果过滤到用户当前的产品和版本(用户仍可以移除这些过滤器来扩大搜索范围)。对于具有[本地化文档](/learn/docs/localization/overview)的站点,搜索会自动限定为读者的活动语言。
+
+如果您正在使用 [Ask Fern](/learn/docs/ai-features/ask-fern/overview)(AI 搜索),搜索框也会作为您站点的聊天窗口。
+
+
+ 具有 `nofollow` 或 `noindex` [frontmatter](/learn/docs/configuration/page-level-settings#indexing-properties) 的页面将从 Algolia DocSearch 索引中排除,不会出现在搜索结果中。
+
+
+## 结果排名机制
+
+Fern 配置 Algolia 的排名以优先考虑高信号属性(如标题和关键字)中的匹配,而不是正文文本,然后应用时效性、版本和页面位置的平分决胜机制。
+
+
+
+ Algolia 根据包含匹配文本的属性对结果进行排名。前面列出的属性权重高于后面列出的属性。Fern 按优先级顺序配置以下可搜索属性:
+
+ | 优先级 | 属性 | 描述 |
+ | --- | --- | --- |
+ | 1 | 关键字 | 在页面 frontmatter 中设置的[关键字](/learn/docs/configuration/page-level-settings#document-properties)。使用这些来为查询显示页面而无需更改其内容。 |
+ | 2 | 页面标题 | 在 frontmatter 或 `docs.yml` 中设置的[标题](/learn/docs/configuration/page-level-settings#title) |
+ | 3 | 标题层次结构(h1–h6) | 页面内的[标题](/learn/docs/writing-content/markdown-basics#page-header),从 h1(最高)到 h6(最低) |
+ | 4 | 端点路径 | API 端点路径(例如 `/plants/{plantId}`) |
+ | 5 | 端点路径替代项 | 端点路径的替代表示形式 |
+ | 6 | 参数名称 | API 参数的名称 |
+ | 7 | 元数据属性 | 可用性、API 类型、HTTP 方法、内容类型、响应类型、状态码和参数类型 |
+ | 8 | 面包屑 | 页面的导航面包屑路径 |
+ | 9 | 描述 | 页面的[元描述](/learn/docs/configuration/page-level-settings#meta-description) |
+ | 10 | 正文内容 | 页面的完整正文文本 |
+ | 11 | 代码片段 | 嵌入页面中的[代码块](/learn/docs/writing-content/components/code-blocks) |
+
+ 所有属性都使用 `unordered` 匹配,这意味着查询词在属性内的位置不会影响排名。例如,页面标题末尾的匹配与开头的匹配排名相同。
+
+
+ 当多个结果具有相同的文本相关性评分时,Fern 应用自定义排名规则作为平分决胜:
+
+ 1. **日期(降序):** 较新的内容排名更高。这主要影响带有时间戳的更新日志条目。
+ 2. **版本索引(升序):** 默认版本的内容排名高于较旧版本的内容。这可以防止版本文档中的重复结果。
+ 3. **页面位置(升序):** 靠近页面顶部的内容排名高于较远位置的内容。例如,页面顶部附近的标题匹配优于同一页面下方的部分匹配。
+
+ 此外,Fern 通过规范路径名去重结果,因此每个页面在结果中最多出现一次。当存在重复项时,版本索引和页面位置平分决胜确定哪个记录代表该页面。
+
+
+ 您的文档导航层次结构不会直接影响搜索排名。嵌套页面在文本相关性方面与顶级页面排名相同。但是,在单个页面内,标题深度确实重要:h1 标题中的匹配排名高于 h2,h2 高于 h3,依此类推。标题层次结构按记录存储,因此 Algolia 可以区分顶级部分中的匹配和子部分中的匹配。
+
+
+ 如果查询没有返回结果,Algolia 会逐步移除常见的文档术语来扩大搜索范围。当没有找到完全匹配时,以下词语被视为可选:`endpoint`、`api`、`guide`、`documentation`、`doc`、`parameter`、`webhook`、`websocket`、`http`、`code` 和 `snippet`。
+
+ 例如,搜索 `webhook endpoint` 没有返回结果时,会单独重试 `webhook` 和 `endpoint`。
+
+
+
+## 与 Algolia 集成
+
+如果您需要将 Fern 的文档搜索集成到您自己的应用程序或仪表板中,您可以使用[独立搜索组件](/learn/docs/ai-features/ask-fern/search-widget)来嵌入一个现成的 React 组件,或者直接从 Fern 团队请求 Algolia 凭据以构建自定义集成。
+
+### 发起搜索请求
+
+一旦您拥有凭据,您就可以向 Algolia 的 API 发起请求来搜索您的文档。
+
+请联系 Fern 团队获取您的特定应用程序 ID 和索引名称。凭据是按客户提供的,以维护安全性。
+
+
+ **注意:** 请保护您的 Algolia 凭据安全,避免在客户端代码中暴露它们。考虑实施后端代理来发起 Algolia 请求。
+
+
+## 使用替代搜索
+
+您可以使用[自定义 JavaScript](/learn/docs/building-and-customizing-your-docs/custom-css-global-js#custom-javascript) 和您的 Algolia 凭据来覆盖 Fern 的搜索为您自己的解决方案。
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/customization/user-feedback.mdx b/fern/translations/zh-CN/products/docs/pages/customization/user-feedback.mdx
new file mode 100644
index 0000000000..6a9d9b571d
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/customization/user-feedback.mdx
@@ -0,0 +1,58 @@
+---
+title: 从用户收集反馈和建议
+slug: user-feedback
+sidebar-title: 从用户收集反馈和建议
+description: 通过 GitHub 或 Fern Editor 在 Fern 文档中收集页面反馈并启用用户编辑建议。
+---
+
+
+Fern 提供了多种方式来跟踪用户的反馈和改进建议。
+
+## 页面反馈
+
+默认情况下,文档的每个 Markdown 页面底部都包含一个反馈组件:
+
+
+
+
+
+您也可以为[单个页面](/learn/docs/configuration/page-level-settings#on-page-feedback)或[所有页面](/learn/docs/configuration/site-level-settings#layouthide-feedback)禁用此功能。
+
+
+在[自托管](/learn/docs/self-hosted/overview)部署中,反馈事件以结构化 JSON 格式记录到容器的 stdout。详情请参阅[页面反馈](/learn/docs/self-hosted/set-up#on-page-feedback)。
+
+
+### 在仪表板中查看反馈
+
+您可以在 [Fern Dashboard](https://dashboard.buildwithfern.com/) 的 **Feedback** 选项卡中查看所有页面[反馈回复](/learn/dashboard/getting-started/overview)。表格显示每个页面的反馈,包括页面是否有用以及原因(如果提供),以及渠道、位置和日期。您可以按日期范围筛选并将结果导出为 CSV。
+
+## 编辑此页面
+
+允许用户直接从您的文档中建议对当前页面的更改。此功能有两种模式:
+
+- **GitHub(默认):** 点击按钮直接链接到 GitHub 存储库中页面的源文件,用户可以在此建议更改。这对于具有公共存储库的公开网站是理想的选择,允许外部用户提交拉取请求。
+- **Dashboard:** 点击按钮打开一个屏幕,用户可以选择为该页面启动 Fern Editor 会话或导航到 GitHub 上的源文件。这对于内部网站特别有用,因为许多或大多数查看者也具有编辑器访问权限,可以直接通过 [Fern Editor](/learn/docs/writing-content/fern-editor) 进行更改。
+
+
+
+
+
+您可以在[全局配置](/learn/docs/configuration/site-level-settings#edit-this-page-configuration)中配置此功能,包括按钮是直接链接到 GitHub 还是提供编辑选项。您也可以在[前置元数据](/learn/docs/configuration/page-level-settings#edit-this-page)中覆盖单个页面的编辑 URL。
+
+
+此功能在预览链接中有效,但在本地开发中不起作用。
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/developer-tools/asyncapi-spec.mdx b/fern/translations/zh-CN/products/docs/pages/developer-tools/asyncapi-spec.mdx
new file mode 100644
index 0000000000..37623d3e2c
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/developer-tools/asyncapi-spec.mdx
@@ -0,0 +1,41 @@
+---
+title: 下载 AsyncAPI 规范
+description: Fern 从您的文档站点提供 AsyncAPI 2.6.0 规范,以便 AI 工具和 LLMs 可以以编程方式发现并与您的 WebSocket API 交互。
+sidebar-title: 下载 AsyncAPI 规范
+---
+
+
+Fern 文档站点自动提供您的原始 AsyncAPI 2.6.0 规范用于 WebSocket 通道,因此任何人——或任何工具——都可以下载它用于客户端生成、合约测试或导入到支持 AsyncAPI 的工具中。
+
+该规范也从您站点的 [`llms.txt`](/learn/docs/ai-features/llms-txt) 中进行链接,因此像 Cursor、Copilot 和 Claude 这样的 AI 编码助手可以发现并使用它来生成准确的 WebSocket 集成。
+
+## 可用端点
+
+每个带有 WebSocket 通道的 Fern 文档站点都会在这些路径公开 AsyncAPI 规范:
+
+| 端点 | 格式 | Content-Type |
+|----------|--------|--------------|
+| `/asyncapi.json` | JSON | `application/json` |
+| `/asyncapi.yaml` | YAML | `application/x-yaml` |
+| `/asyncapi.yml` | YAML | `application/x-yaml` |
+
+该规范包括所有 WebSocket 通道,包含发布/订阅消息、路径参数、查询参数、作为 WebSocket 绑定的头部、身份验证方案、作为组件架构的类型定义,以及来自您环境配置的服务器 URL。它从驱动您文档的同一个 API 定义生成,因此始终保持最新。
+
+## 使用方法
+
+将端点附加到您的文档 URL 来下载规范:
+
+```bash
+# 下载为 JSON
+curl https://your-docs-site.com/asyncapi.json
+
+# 下载为 YAML
+curl https://your-docs-site.com/asyncapi.yaml
+```
+
+如果您的文档站点包含多个带有 WebSocket 通道的 API 定义,端点会返回可用 API 的列表。使用 `api` 查询参数来选择特定的 API:
+
+```bash
+# 获取特定 API 的规范
+curl https://your-docs-site.com/asyncapi.json?api=my-api-id
+```
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/developer-tools/auto-update-last-updated.mdx b/fern/translations/zh-CN/products/docs/pages/developer-tools/auto-update-last-updated.mdx
new file mode 100644
index 0000000000..e4f1896553
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/developer-tools/auto-update-last-updated.mdx
@@ -0,0 +1,106 @@
+---
+title: 自动更新最后更新日期
+description: 使用 GitHub Action 在 MDX 文件更改时自动更新 last-updated 前置属性。
+sidebar-title: 自动更新最后更新日期
+---
+
+您可以使用 GitHub Action 在拉取请求中修改 MDX 文件时自动更新 [`last-updated` 前置属性](/learn/docs/configuration/page-level-settings#last-updated)。这样可以让您的文档"最后更新"时间戳保持准确,无需手动更新。
+
+## 设置工作流
+
+将此 GitHub Action 工作流添加到您的文档仓库。
+
+当打开或更新拉取请求时,工作流会检测哪些 MDX 文件发生了更改,在其前置属性中更新或添加带有当前日期的 `last-updated` 字段,并将更改提交回 PR 分支。
+
+
+日期格式为"月 日, 年"(例如,"December 11, 2025")。您可以通过修改工作流中的 `date` 命令来自定义格式。
+
+
+```yml title=".github/workflows/update-last-updated.yml" maxLines=14
+name: Update last updated date
+
+# Trigger this workflow when PRs are opened or updated
+on:
+ pull_request:
+ types: [opened, synchronize]
+ branches:
+ - main # Adjust to match your main branch name
+
+jobs:
+ update-last-updated:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write # Required to commit changes
+ pull-requests: write # Required to update the PR
+ steps:
+ # Step 1: Check out the PR branch
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ ref: ${{ github.head_ref }} # Check out the PR's source branch
+ fetch-depth: 0
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ # Step 2: Identify which MDX files changed in this PR
+ - name: Get changed MDX files
+ id: changed-files
+ uses: tj-actions/changed-files@v45
+ with:
+ files: |
+ **/*.mdx # Only track changes to .mdx files
+
+ # Step 3: Update the last-updated field in each changed MDX file
+ - name: Update last-updated frontmatter
+ if: steps.changed-files.outputs.any_changed == 'true'
+ run: |
+ # Generate current date in "Month Day, Year" format (e.g., "December 11, 2025")
+ # Modify the date format here if you prefer a different style
+ CURRENT_DATE=$(date +"%B %-d, %Y")
+ echo "Current date: $CURRENT_DATE"
+
+ # Process each changed MDX file
+ for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
+ echo "Processing: $file"
+
+ # Skip if file was deleted or doesn't exist
+ if [ ! -f "$file" ]; then
+ echo "File not found, skipping: $file"
+ continue
+ fi
+
+ # Check if file has frontmatter (must start with ---)
+ if ! head -1 "$file" | grep -q "^---"; then
+ echo "No frontmatter found, skipping: $file"
+ continue
+ # If file already has a last-updated field, update it
+ elif grep -q "^last-updated:" "$file"; then
+ echo "Updating existing last-updated field"
+ sed -i "s/^last-updated:.*$/last-updated: $CURRENT_DATE/" "$file"
+ # If file has frontmatter but no last-updated field, add it
+ else
+ echo "Adding last-updated field to existing frontmatter"
+ # This awk command inserts the last-updated field just before the closing ---
+ awk -v date="$CURRENT_DATE" '
+ BEGIN { in_frontmatter=0; added=0 }
+ NR==1 && /^---$/ { in_frontmatter=1; print; next }
+ in_frontmatter && /^---$/ && !added { print "last-updated: " date; added=1; print; in_frontmatter=0; next }
+ { print }
+ ' "$file" > "${file}.tmp" && mv "${file}.tmp" "$file"
+ fi
+ done
+
+ # Step 4: Commit and push the updated files back to the PR
+ - name: Commit changes
+ if: steps.changed-files.outputs.any_changed == 'true'
+ run: |
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
+ git config --local user.name "github-actions[bot]"
+ git add -A
+ # Only commit if there are actual changes
+ if git diff --staged --quiet; then
+ echo "No changes to commit"
+ else
+ git commit -m "chore: update last-updated date in MDX files"
+ git push
+ fi
+```
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/developer-tools/cursor.mdx b/fern/translations/zh-CN/products/docs/pages/developer-tools/cursor.mdx
new file mode 100644
index 0000000000..7c4271428e
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/developer-tools/cursor.mdx
@@ -0,0 +1,343 @@
+---
+title: Cursor
+sidebar-title: Cursor
+---
+
+## 什么是 Cursor?
+
+[Cursor](https://www.cursor.com/) 是一个使用 AI 辅助代码开发过程的代码编辑器。
+
+## 将 Cursor 与 Fern 结合使用
+
+为了优化您在 Cursor 中的体验,您可以在 Cursor 的系统设置中添加指令:
+
+
+

+
+
+
+ 一个有用指令的示例可能是:"始终将图片包装在 `` 组件中。"
+
+
+### .CursorRules
+
+您还可以在项目根目录的 `.cursorrules` 文件中添加项目特定的规则。
+
+
+以下是 ElevenLabs 团队使用的 `.cursorrules` 文件示例:
+
+`````md
+You are the world's best documentation writer, renowned for your clarity, precision, and engaging style. Every piece of documentation you produce is:
+
+1. Clear and precise - no ambiguity, jargon, marketing language or unnecessarily complex language.
+2. Concise—short, direct sentences and paragraphs.
+3. Scientifically structured—organized like a research paper or technical white paper, with a logical flow and strict attention to detail.
+4. Visually engaging—using line breaks, headings, and components to enhance readability.
+5. Focused on user success — no marketing language or fluff; just the necessary information.
+
+# Writing guidelines
+
+- Titles must always start with an uppercase letter, followed by lowercase letters unless it is a name. Examples: Getting started, Text to speech, Conversational AI...
+- No emojis or icons unless absolutely necessary.
+- Scientific research tone—professional, factual, and straightforward.
+- Avoid long text blocks. Use short paragraphs and line breaks.
+- Do not use marketing/promotional language.
+- Be concise, direct, and avoid wordiness.
+- Tailor the tone and style depending on the location of the content.
+ - The `docs` tab (/fern/docs folder) contains a mixture of technical and non-technical content.
+ - The /fern/docs/pages/capabilities folder should not contain any code and should be easy to read for both non-technical and technical readers.
+ - The /fern/docs/pages/workflows folder is tailored to non-technical readers (specifically enterprise customers) who need detailed step-by-step visual guides.
+ - The /fern/docs/pages/developer-guides is strictly for technical readers. This contains detailed guides on how to use the SDK or API.
+ - The best-practices folder contains both tech & non-technical content.
+ - The `conversational-ai` tab (/fern/conversational-ai) contains content for the conversational-ai product. It is tailored to technical people but may be read by non-technical people.
+ - The `api-reference` tab (/fern/api-reference) contains content for the API. It is tailored to technical people only.
+- If the user asks you to update the changelog, you must create a new changelog file in the /fern/docs/pages/changelog folder with the following file name: `2024-10-13.md` (the date should be the current date).
+
+ - The structure of the changelog should look something like this:
+
+- Ensure there are well-designed links (if applicable) to take the technical or non-technical reader to the relevant page.
+
+# Page structure
+
+- Every `.mdx` file starts with:
+ ```
+ ---
+ title:
+ subtitle:
+ ---
+ ```
+ - Example titles (good, short, first word capitalized):
+ - Getting started
+ - Text to speech
+ - Streaming
+ - API reference
+ - Conversational AI
+ - Example subtitles (concise, some starting with "Learn how to …" for guides):
+ - Build your first conversational AI voice agent in 5 minutes.
+ - Learn how to control delivery, pronunciation & emotion of text to speech.
+- All documentation images are located in the non-nested /fern/assets/images folder. The path can be referenced in `.mdx` files as /assets/images/.jpg/png/svg.
+
+## Components
+
+Use the following components whenever possible to enhance readability and structure.
+
+### Accordions
+
+````
+
+
+ You can put other components inside Accordions.
+ ```ts
+ export function generateRandomNumber() {
+ return Math.random();
+ }
+ ```
+
+
+ This is a second option.
+
+
+
+ This is a third option.
+
+
+````
+
+### Callouts (Tips, Notes, Warnings, etc.)
+
+```
+
+This Callout uses a title and a custom icon.
+
+This adds a note in the content
+This raises a warning to watch out for
+This indicates a potential error
+This draws attention to important information
+This suggests a helpful tip
+This brings us a checked status
+```
+
+### Cards & Card Groups
+
+```
+
+View Fern's Python SDK generator.
+
+
+
+ This is the first card.
+
+
+ This is the second card.
+
+
+ This is the third card.
+
+
+ This is the fourth and final card.
+
+
+```
+
+### Code snippets
+
+- Always use the focus attribute to highlight the code you want to highlight.
+- `maxLines` is optional if it's long.
+- `wordWrap` is optional if the full text should wrap and be visible.
+
+```javascript focus={2-4} maxLines=10 wordWrap
+console.log('Line 1');
+console.log('Line 2');
+console.log('Line 3');
+console.log('Line 4');
+console.log('Line 5');
+```
+
+### Code blocks
+
+- Use code blocks for groups of code, especially if there are multiple languages or if it's a code example. Always start with Python as the default.
+
+````
+
+```javascript title="helloWorld.js"
+console.log("Hello World");
+````
+
+```python title="hello_world.py"
+print('Hello World!')
+```
+
+```java title="HelloWorld.java"
+ class HelloWorld {
+ public static void main(String[] args) {
+ System.out.println("Hello, World!");
+ }
+ }
+```
+
+
+```
+
+### Steps (for step-by-step guides)
+
+```
+
+ ### First Step
+ Initial instructions.
+
+ ### Second Step
+ More instructions.
+
+ ### Third Step
+ Final Instructions
+
+
+```
+
+### Frames
+
+- You must wrap every single image in a frame.
+- Every frame must have `background="subtle"`
+- Use captions only if the image is not self-explanatory.
+- Use  as opposed to HTML `
` tags unless styling.
+
+```
+
+
+
+
+```
+
+### Tabs (split up content into different sections)
+
+```
+
+
+ ☝️ Welcome to the content that you can only see inside the first Tab.
+
+
+ ✌️ Here's content that's only inside the second Tab.
+
+
+ 💪 Here's content that's only inside the third Tab.
+
+
+
+```
+
+# Examples of a well-structured piece of documentation
+
+- Ideally there would be links to either go to the workflows for non-technical users or the developer-guides for technical users.
+- The page should be split into sections with a clear structure.
+
+```
+---
+title: Text to speech
+subtitle: Learn how to turn text into lifelike spoken audio with ElevenLabs.
+---
+
+## Overview
+
+ElevenLabs [Text to Speech (TTS)](/docs/api-reference/text-to-speech) API turns text into lifelike audio with nuanced intonation, pacing and emotional awareness. [Our models](/docs/models) adapt to textual cues across 32 languages and multiple voice styles and can be used to:
+
+- Narrate global media campaigns & ads
+- Produce audiobooks in multiple languages with complex emotional delivery
+- Stream real-time audio from text
+
+Listen to a sample:
+
+
+
+Explore our [Voice Library](https://elevenlabs.io/community) to find the perfect voice for your project.
+
+## Parameters
+
+The `text-to-speech` endpoint converts text into natural-sounding speech using three core parameters:
+
+- `model_id`: Determines the quality, speed, and language support
+- `voice_id`: Specifies which voice to use (explore our [Voice Library](https://elevenlabs.io/community))
+- `text`: The input text to be converted to speech
+- `output_format`: Determines the audio format, quality, sampling rate & bitrate
+
+### Voice quality
+
+For real-time applications, Flash v2.5 provides ultra-low 75ms latency optimized for streaming, while Multilingual v2 delivers the highest quality audio with more nuanced expression.
+
+Learn more about our [models](/docs/models).
+
+### Voice options
+
+ElevenLabs offers thousands of voices across 32 languages through multiple creation methods:
+
+- [Voice Library](/docs/voice-library) with 3,000+ community-shared voices
+- [Professional Voice Cloning](/docs/voice-cloning/professional) for highest-fidelity replicas
+- [Instant Voice Cloning](/docs/voice-cloning/instant) for quick voice replication
+- [Voice Design](/docs/voice-design) to generate custom voices from text descriptions
+
+Learn more about our [voice creation options](/docs/voices).
+
+## Supported formats
+
+The default response format is "mp3", but other formats like "PCM", & "μ-law" are available.
+
+- **MP3**
+ - Sample rates: 22.05kHz - 44.1kHz
+ - Bitrates: 32kbps - 192kbps
+ - **Note**: Higher quality options require Creator tier or higher
+- **PCM (S16LE)**
+ - Sample rates: 16kHz - 44.1kHz
+ - **Note**: Higher quality options require Pro tier or higher
+- **μ-law**
+ - 8kHz sample rate
+ - Optimized for telephony applications
+
+
+ Higher quality audio options are only available on paid tiers - see our [pricing
+ page](https://elevenlabs.io/pricing) for details.
+
+
+## FAQ
+
+
+
+ The models interpret emotional context directly from the text input. For example, adding
+ descriptive text like "she said excitedly" or using exclamation marks will influence the speech
+ emotion. Voice settings like Stability and Similarity help control the consistency, while the
+ underlying emotion comes from textual cues.
+
+
+ Yes. Instant Voice Cloning quickly mimics another speaker from short clips. For high-fidelity
+ clones, check out our Professional Voice Clone.
+
+
+ Yes. You retain ownership of any audio you generate. However, commercial usage rights are only
+ available with paid plans. With a paid subscription, you may use generated audio for commercial
+ purposes and monetize the outputs if you own the IP rights to the input content.
+
+
+ Use the low-latency Flash models (Flash v2 or v2.5) optimized for near real-time conversational
+ or interactive scenarios. See our [latency optimization guide](/docs/latency-optimization) for
+ more details.
+
+
+ The models are nondeterministic. For consistency, use the optional seed parameter, though subtle
+ differences may still occur.
+
+
+ Split long text into segments and use streaming for real-time playback and efficient processing.
+ To maintain natural prosody flow between chunks, use `previous_text` or `previous_request_ids`.
+
+
+```
+`````
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/developer-tools/gitlab.mdx b/fern/translations/zh-CN/products/docs/pages/developer-tools/gitlab.mdx
new file mode 100644
index 0000000000..ab3562c278
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/developer-tools/gitlab.mdx
@@ -0,0 +1,144 @@
+---
+title: 使用 GitLab 托管
+description: 设置 GitLab CI/CD 以在更改合并到主分支时自动发布你的 Fern 文档。
+sidebar-title: 使用 GitLab 托管
+---
+
+使用 GitLab CI/CD 可以在合并请求时自动生成预览链接,在更改合并到 `main` 分支时发布你的 Fern 文档,并在合并后删除预览链接。
+
+
+- Node.js 版本 22 或更高
+- [Fern CLI](/learn/cli-api-reference/cli-reference/overview#install-fern-cli) 已在本地安装
+- 包含 `fern` 文件夹的 Fern 项目([快速开始](/learn/docs/getting-started/quickstart))
+
+
+## 将 Fern token 添加到 GitLab
+
+
+### 生成 Fern token
+
+在包含 `fern` 文件夹的目录中,从终端运行 [`fern token`](/learn/cli-api-reference/cli-reference/commands#fern-token)。这会生成一个组织范围的 token,用于在 CI/CD 中验证 Fern CLI。
+
+```bash
+fern token
+```
+
+复制 token 输出 — 你将在下一步中将其添加到 GitLab。
+
+### 将 Fern token 添加为 CI/CD 变量
+
+1. 登录 [GitLab](https://gitlab.com/users/sign_in) 并导航到你的 Fern 文档仓库。
+2. 转到 **Settings** > **CI/CD**。
+3. 滚动到 **Variables** 部分,选择 **Expand**,然后点击 **Add variable**。
+4. 将键设置为 `FERN_TOKEN`,将你在上一步中生成的 token 粘贴为值,_取消选择_ **Protect variable**,然后点击 **Save changes**。
+
+
+
+## 将项目访问 token 添加到 GitLab
+
+要在合并请求上发布预览链接,你需要一个 GitLab 项目访问 token。
+
+
+### 创建项目访问 token
+
+1. 在你的 GitLab 仓库中,转到 **Settings** > **Access Tokens**。
+2. 点击 **Add new token** 并配置以下内容:
+ - **Token name**:描述性名称(例如,`fern-preview`)
+ - **Expiration date**:根据需要设置(过期后需要重新生成)
+ - **Role**:Reporter
+ - **Scopes**:api
+3. 点击 **Create project access token** 并复制 token。
+
+
+立即保存生成的 token — 离开页面后将不会再显示。
+
+
+### 将项目访问 token 添加为 CI/CD 变量
+
+1. 转到 **Settings** > **CI/CD**。
+2. 滚动到 **Variables** 部分,选择 **Expand**,然后点击 **Add variable**。
+3. 将键设置为 `REPO_TOKEN`,将项目访问 token 粘贴为值,_取消选择_ **Protect variable**,然后点击 **Save changes**。
+
+
+
+## 添加 CI/CD 流水线
+
+在你的仓库根目录中创建一个 `.gitlab-ci.yml` 文件。这个流水线验证你的 API 定义,在每个合并请求上发布按分支的预览链接,在更改合并到 `main` 时发布你的文档,并删除已合并分支的预览部署。
+
+```yaml .gitlab-ci.yml
+stages:
+ - check
+ - preview_docs
+ - publish_docs
+ - cleanup_preview
+
+before_script:
+ - apt-get update -y
+ - apt-get install -y curl jq
+ - curl -sL https://deb.nodesource.com/setup_current.x | bash -
+ - apt-get install -y nodejs
+ - npm install -g fern-api
+
+check:
+ stage: check
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+ - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
+ script:
+ - echo "Checking API is valid"
+ - fern check
+
+preview_docs:
+ stage: preview_docs
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+ script:
+ - echo "Generating preview for branch $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME..."
+ - |
+ OUTPUT=$(fern generate --docs --preview --id "$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME" --force 2>&1) || true
+ echo "$OUTPUT"
+ DEMO_URL=$(echo "$OUTPUT" | grep -oE -m1 '(https://[^[:space:]]+-preview-[^[:space:]]+) ' | tr -d ' ')
+ echo "Preview URL: $DEMO_URL"
+ - |
+ if [ -z "$DEMO_URL" ]; then
+ echo "No preview URL found"
+ exit 1
+ fi
+ curl --location --request POST \
+ --header "PRIVATE-TOKEN: $REPO_TOKEN" \
+ --header "Content-Type: application/json" \
+ --url "https://gitlab.com/api/v4/projects/$CI_MERGE_REQUEST_PROJECT_ID/merge_requests/$CI_MERGE_REQUEST_IID/notes" \
+ --data-raw "{ \"body\": \"Preview your docs [here]($DEMO_URL)\" }"
+
+publish_docs:
+ stage: publish_docs
+ rules:
+ - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
+ script:
+ - echo "Publishing Docs"
+ - fern generate --docs
+
+cleanup_preview:
+ stage: cleanup_preview
+ rules:
+ - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
+ script:
+ - echo "Looking up merged MR for commit $CI_COMMIT_SHA..."
+ - |
+ MR_INFO=$(curl -sf --header "PRIVATE-TOKEN: $REPO_TOKEN" \
+ "https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/repository/commits/$CI_COMMIT_SHA/merge_requests") || {
+ echo "Failed to query MRs for commit — skipping cleanup"
+ exit 0
+ }
+ SOURCE_BRANCH=$(echo "$MR_INFO" | jq -r 'map(select(.state == "merged")) | .[0].source_branch // empty')
+
+ if [ -z "$SOURCE_BRANCH" ]; then
+ echo "No merged MR found for this commit (likely a direct push to main) — skipping cleanup"
+ exit 0
+ fi
+
+ echo "Deleting preview for branch: $SOURCE_BRANCH"
+ fern docs preview delete --id "$SOURCE_BRANCH" || echo "Preview deletion returned non-zero — it may already be gone"
+```
+
+提交并推送 `.gitlab-ci.yml` 文件到你的仓库。流水线会在合并请求时以及更改合并到默认分支时自动运行。
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/developer-tools/openapi-spec.mdx b/fern/translations/zh-CN/products/docs/pages/developer-tools/openapi-spec.mdx
new file mode 100644
index 0000000000..f34cc2b35c
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/developer-tools/openapi-spec.mdx
@@ -0,0 +1,41 @@
+---
+title: 下载 OpenAPI 规范
+description: Fern 从您的文档站点提供您的 OpenAPI 3.1 规范,以便 AI 工具和 LLM 可以通过编程方式发现并与您的 API 交互。
+sidebar-title: 下载 OpenAPI 规范
+---
+
+
+Fern 文档站点会自动提供您的原始 OpenAPI 3.1 规范,因此任何人——或任何工具——都可以下载它用于 SDK 生成、契约测试或导入到 Postman 等工具中。
+
+该规范还从您站点的 [`llms.txt`](/learn/docs/ai-features/llms-txt) 中链接,因此 Cursor、Copilot 和 Claude 等 AI 编码助手可以发现并使用它来生成准确的 API 调用和构建集成。
+
+## 可用端点
+
+每个 Fern 文档站点都会在以下路径公开 OpenAPI 规范:
+
+| 端点 | 格式 | Content-Type |
+|----------|--------|--------------|
+| `/openapi.json` | JSON | `application/json` |
+| `/openapi.yaml` | YAML | `application/x-yaml` |
+| `/openapi.yml` | YAML | `application/x-yaml` |
+
+该规范包含所有端点及其请求/响应模式、身份验证方案(Bearer、Basic、API Key、OAuth)、webhook、作为组件模式的类型定义,以及来自您环境配置的服务器 URL。它基于为您的文档提供动力的相同 API 定义生成,因此始终保持最新。
+
+## 使用方法
+
+将端点附加到您的文档 URL 以下载规范:
+
+```bash
+# 下载为 JSON
+curl https://your-docs-site.com/openapi.json
+
+# 下载为 YAML
+curl https://your-docs-site.com/openapi.yaml
+```
+
+如果您的文档站点包含多个 API 定义,端点会返回可用 API 的列表。使用 `api` 查询参数来选择特定的 API:
+
+```bash
+# 获取特定 API 的规范
+curl https://your-docs-site.com/openapi.json?api=my-api-id
+```
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/developer-tools/orchestrate-docs-releases.mdx b/fern/translations/zh-CN/products/docs/pages/developer-tools/orchestrate-docs-releases.mdx
new file mode 100644
index 0000000000..e06e1c9767
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/developer-tools/orchestrate-docs-releases.mdx
@@ -0,0 +1,99 @@
+---
+title: 协调发布
+description: 基于 GitHub 仓库发布自动化文档发布。设置工作流程在功能发布时触发自动合并 PR。
+sidebar-title: 协调发布
+---
+
+Fern Docs 支持基于其他仓库的发布来协调文档发布。这在记录依赖于其他仓库发布的功能时很有用。
+
+这需要两个 GitHub Actions:一个在功能仓库中,一个在文档仓库中。
+
+
+
+
+将此 GitHub Action 工作流程添加到功能发布的仓库中。当使用指定标签模式创建新发布时,此工作流程将向您的文档仓库发送通知,触发自动合并流程。
+
+将以下占位符替换为您自己的值:
+- ``:具有 `repo` 权限的 GitHub 令牌
+- ``:包含文档仓库的组织
+- ``:文档仓库名称
+- ``:产品发布标签
+
+```yml title=".github/workflows/notify-docs-repo.yml"
+name: Notify Docs Repo
+on:
+ release:
+ types: [created]
+
+jobs:
+ notify-docs:
+ runs-on: ubuntu-latest
+ if: startsWith(github.event.release.tag_name, '@')
+ steps:
+ - name: Trigger docs repo workflow
+ run: |
+ curl -f -X POST \
+ -H "Accept: application/vnd.github.v3+json" \
+ -H "Authorization: token ${{ secrets. }}" \
+ https://api.github.com/repos///dispatches \
+ -d '{"event_type":"","client_payload":{"version":"${{ github.ref_name }}"}}'
+```
+
+
+
+
+将此 GitHub Action 工作流程添加到您的文档仓库中,以在功能发布时自动合并 PR。将 `` 替换为您的产品发布标签。
+
+```yml title=".github/workflows/auto-merge-on-release.yml"
+name: Auto-merge on Docs Release
+on:
+ repository_dispatch:
+ types: []
+
+jobs:
+ merge-dependent-prs:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Find and merge dependent PRs
+ uses: actions/github-script@v7
+ with:
+ script: |
+ const version = context.payload.client_payload.version;
+
+ // Find PRs with matching labels
+ const { data: prs } = await github.rest.pulls.list({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ state: 'open'
+ });
+
+ for (const pr of prs) {
+ const labels = pr.labels.map(l => l.name);
+ const hasLatestLabel = labels.includes('depends-on: @latest');
+ const hasVersionLabel = labels.includes(`depends-on: @${version}`);
+
+ if (hasLatestLabel || hasVersionLabel) {
+ // Check if PR is approved
+ const { data: reviews } = await github.rest.pulls.listReviews({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ pull_number: pr.number
+ });
+
+ const approved = reviews.some(r => r.state === 'APPROVED');
+
+ if (approved) {
+ await github.rest.pulls.merge({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ pull_number: pr.number,
+ merge_method: 'squash'
+ });
+
+ console.log(`Merged PR #${pr.number}: ${pr.title}`);
+ }
+ }
+ }
+```
+
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/developer-tools/vale.mdx b/fern/translations/zh-CN/products/docs/pages/developer-tools/vale.mdx
new file mode 100644
index 0000000000..2c9732d0a0
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/developer-tools/vale.mdx
@@ -0,0 +1,76 @@
+---
+title: 使用 Vale
+description: 了解如何设置 Vale 来检查您的 Fern 文档语法并在整个文档中保持一致的写作风格。
+sidebar-title: 使用 Vale
+---
+
+[Vale](https://vale.sh/) 是一个开源的语法检查工具,有助于维护一致的写作风格并捕获文档中的常见错误。
+
+将 Vale 与您的 Fern 文档一起使用,以自动检查风格问题并强制执行写作指南。Vale 可以在本地或 CI/CD 中运行,在问题发布之前捕获它们。
+
+## 设置
+
+
+
+在您的本地机器上[安装 Vale](https://vale.sh/docs/vale-cli/installation/)。
+
+
+
+创建一个 [`.vale.ini` 文件](https://vale.sh/docs/vale-ini)并添加以下内容,以便 Vale 将 MDX 文件解析为 Markdown:
+
+```txt vale.ini
+[formats]
+mdx = md
+```
+
+
+
+[导入现有的 Vale 风格包](https://vale.sh/explorer)或创建您自己的[风格规则](https://vale.sh/docs/styles)。
+
+
+
+检查您的整个文档集、目录中的所有页面或特定页面:
+```bash
+vale fern/
+vale fern/pages/payments/
+vale fern/pages/payments/overview.mdx
+```
+
+
+
+要在 Fern 文档的特定部分禁用 Vale,请使用包装在 MDX 语法中的 Vale 注释。这对于代码块特别有用,因为 Vale 可能会将变量名或代码语法标记为风格违规。
+
+````jsx Example Vale Usage maxLines=10
+Vale 将检查此文本。
+
+{/* */}
+
+Vale 不会检查此文本
+
+
+```typescript
+import { PlantClient } from "@plantstore/sdk";
+
+const client = new PlantClient({ apiKey: "YOUR_API_KEY" });
+const plant = await client.createPlant({
+ name: "Monstera",
+ species: "Monstera deliciosa"
+});
+```
+
+
+{/* */}
+
+Vale 将重新开始检查此文本。
+````
+
+
+
+考虑将 Vale 集成到您的工作流程中,以便为所有贡献者自动运行:
+
+- **GitHub Actions**:使用 [Vale Action](https://github.com/errata-ai/vale-action) 在拉取请求上运行 Vale 并在风格问题上添加内联注释
+- **Pre-commit 钩子**:使用 [Vale 的 pre-commit 集成](https://vale.sh/docs/integrations/pre-commit) 在文件提交之前检查它们
+
+这有助于在您的文档团队中强制执行一致的风格标准,而无需手动运行 Vale。
+
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/developer-tools/view-markdown.mdx b/fern/translations/zh-CN/products/docs/pages/developer-tools/view-markdown.mdx
new file mode 100644
index 0000000000..fa47d52ca7
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/developer-tools/view-markdown.mdx
@@ -0,0 +1,20 @@
+---
+title: 查看 Markdown
+description: 了解如何查看文档页面的底层 Markdown,以便进行工具集成和故障排除。
+sidebar-title: 查看 Markdown
+---
+
+在文档页面的 URL 末尾添加 `.md` 或 `.mdx` 可以显示其源 Markdown,不包括 frontmatter。这适用于普通页面和 API 参考页面。
+
+显示页面的 Markdown 有助于排查布局问题,并使外部工具或 AI 代理更容易处理页面内容。默认情况下,每个页面都启用了**查看 Markdown**按钮,可以通过[页面操作配置](/learn/docs/configuration/site-level-settings#page-actions-configuration)进行配置。
+
+
+

+
+
+Fern 还会将您整个网站的 Markdown 打包到 [`llms.txt` 和 `llms-full.txt`](/learn/docs/ai-features/llms-txt) 文件中供 AI 使用。这些文件使用与查看单个页面时相同的底层 Markdown,并遵循相同的 `
` 和 `` 内容控制。
+
+当为 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)。该指令仅对代理可见——面向用户的文档不受影响。
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/getting-started/how-it-works.mdx b/fern/translations/zh-CN/products/docs/pages/getting-started/how-it-works.mdx
new file mode 100644
index 0000000000..3b15f2b183
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/getting-started/how-it-works.mdx
@@ -0,0 +1,143 @@
+---
+title: Fern 文档的工作原理
+description: 了解 Fern 如何将您的 API 规范和文档转换为统一的开发者体验
+sidebar-title: Fern 文档的工作原理
+---
+
+Fern 将您的 API 规范、静态 Markdown 文件(如操作指南和教程)、媒体资源(图像、视频等)以及在 `docs.yml` 文件中定义的自定义设置结合起来,生成一个美观、交互式的托管文档站点。
+
+此过程围绕两个主要工作流程构建:**编辑**和**部署**您的文档。
+
+
+
+此图显示了为文档生成过程提供支持的技术基础设施。
+
+```mermaid
+flowchart TD
+ %% Input sources at the top
+ subgraph inputs ["输入源"]
+ API["API 规范"]
+ DOCS["Docs.yml"]
+ MDX["MDX 文件"]
+ MEDIA["媒体内容"]
+ end
+
+ %% Generation process
+ GENERATE[["fern generate
--docs"]]
+
+ %% AWS VPC section
+ subgraph vpc ["Fern AWS VPC"]
+ direction LR
+ MICROSERVICE["Fern Docs
微服务"]
+ DATABASE[("数据库")]
+ S3[("S3")]
+ end
+
+ %% External services
+ SERVICES["外部服务
(UpStash, Algolia, PostHog,
TurboPuffer, AI 推理)"]
+
+ %% Vercel hosting
+ subgraph vercel ["Vercel"]
+ direction LR
+ STATIC["静态站点"]
+ EXPLORER["API 探索器"]
+ EDGE["Vercel Edge
(中间件)"]
+ end
+
+ %% External connections as hexagons
+ CLOUDFLARE{{"Cloudflare (CORS)"}}
+ WORKOS{{"WorkOS"}}
+ CUSTOMER{{"客户 API"}}
+
+ USER(("用户"))
+
+ %% Vertical flow connections
+ API --> GENERATE
+ DOCS --> GENERATE
+ MDX --> GENERATE
+ MEDIA --> GENERATE
+
+ GENERATE --> MICROSERVICE
+ MICROSERVICE --> SERVICES
+ SERVICES <--> STATIC
+
+ STATIC --> CLOUDFLARE
+ EXPLORER <--> CLOUDFLARE
+ EDGE <--> WORKOS
+
+ CLOUDFLARE --> CUSTOMER
+ EDGE <--> USER
+
+ %% Internal connections
+ MICROSERVICE -.-> DATABASE
+ MICROSERVICE -.-> S3
+```
+
+
+## 内容工作流程
+
+您可以通过两种方式更新您的文档:
+
+- **直接编辑**:直接在[包含您文档的 GitHub 仓库](/learn/docs/getting-started/project-structure)中打开拉取请求(包括您的 `docs.yml` 配置和 Markdown 文件)。
+- **Fern Editor**:使用 [Fern Editor](/learn/docs/writing-content/fern-editor) 修改您的文档,无需接触代码。Fern GitHub App 从您的文档仓库获取当前状态并将其传递给 Fern Editor。当您提交更改时,Fern GitHub App 会自动打开一个拉取请求供审核。
+
+更新通过您的审核流程后,审批者可以合并它。
+
+
+ 您可以使用 [Fern Dashboard](http://dashboard.buildwithfern.com) 管理您的 GitHub 仓库连接、组织成员(添加或删除)、域名和 Fern CLI 版本。
+
+
+## 部署工作流程
+
+当拉取请求合并到您的文档仓库时,自动化管道将您的内容转换为实时文档站点,并通过三个主要阶段与您的 API 更改同步:
+
+
+
+### 触发 GitHub Action 并获取 API 规范
+
+合并的 PR 触发 Fern GitHub Action。该操作使用安全令牌身份验证从单独的仓库检索您的 API 规范。GitHub Action 只能访问运行它的特定文档仓库。
+
+### 生成并处理内容
+[Fern CLI](/learn/cli-api-reference/cli-reference/overview) 运行 `fern generate --docs` 来合并您的 API 规范与文档内容。在幕后,此过程涉及几个关键组件:
+
+- **输入处理**:系统结合您的 API 规范文件、`docs.yml` 配置文件、`.mdx` 文件和媒体内容。
+- **核心基础设施**:生成过程在 Fern 的 AWS VPC 基础设施上运行,其中 Fern Docs 微服务充当中心协调器。此微服务协调内容处理,同时连接到用于存储索引内容的数据库和用于资源存储的 S3。
+- **内容索引**:在生成过程中,Fern 自动索引您的文档内容,以在整个站点中启用搜索功能。此索引与外部服务集成:[Algolia](/learn/docs/customization/search) 提供高级搜索功能,UpStash 用于缓存,PostHog 用于分析,TurboPuffer 用于向量存储,以及 AI 推理服务(Bedrock、Claude)用于智能内容处理。
+
+### 部署到托管平台
+
+处理后的内容被部署到 Vercel 作为文档站点,嵌入了 [API Explorer](/learn/docs/api-references/api-explorer),允许用户直接在文档内测试端点。
+
+Vercel Edge 中间件处理底层路由、身份验证和性能优化。
+
+部署的文档站点与外部系统集成,如 Cloudflare 用于 CORS 管理,WorkOS 用于企业身份验证。
+
+
+
+
+
+此图显示了内容如何从编辑流向部署。
+
+```mermaid
+flowchart TD
+ FE[Fern Editor]
+ U[用户]
+ DR[文档仓库]
+ CLI[Fern CLI]
+ Decision{发起 PR 还是在 Fern Editor 中编辑?}
+ Spec((API 规范仓库))
+ GA[GitHub Actions]
+
+ U ==> Decision
+ Decision == 进行编辑 ==> FE
+ Decision == 打开并合并 PR ==> DR
+
+ FE <== 获取状态并打开 PR ==> DR
+ DR == ① 合并的 PR 触发部署流程 ==> GA
+
+ Spec <-. ② 获取并合并 API 规范 .-> GA
+
+ GA == ③ 触发文档重新生成 ==> CLI
+ CLI == ④ 部署更新的文档 ==> Server[Fern Docs 服务器]
+```
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/getting-started/overview.mdx b/fern/translations/zh-CN/products/docs/pages/getting-started/overview.mdx
new file mode 100644
index 0000000000..6fa1e2cadf
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/getting-started/overview.mdx
@@ -0,0 +1,165 @@
+---
+title: Fern Docs
+subtitle: 使用 Fern Docs 构建精美的交互式文档网站。在 5 分钟内创建 API 参考、自定义组件和 AI 驱动的功能。
+sidebar-title: Fern Docs
+---
+
+
+
+
+
+
+
+## 快速开始
+
+通过导入您现有的样式和规范来构建文档网站。
+
+- [快速开始](/docs/getting-started/quickstart):在 5 分钟内建立一个文档网站。
+- [轻松配置](/docs/configuration/site-level-settings):使用一个简单的文件生成符合您品牌的文档。
+
+## 功能特性
+
+构建您自己的组件,启用 Ask Fern,生成 API 参考,并更新您的文档。
+
+- [灵活的组件库](/docs/writing-content/components/overview):使用预构建或自定义 React 组件获得精美外观。
+- [Fern Editor](/docs/writing-content/fern-editor):无需编写代码即可修改您的文档并发布到 GitHub。
+- [使用您自己的 API 规范](/docs/api-references/generate-api-ref):支持 OpenAPI、AsyncAPI、gRPC、OpenRPC 和 Fern 规范。
+- [AI 功能](/docs/ai-features/overview):AI 原生功能,包括 Ask Fern 和 AI 生成的示例。
+- [自托管您的文档](/docs/self-hosted/overview):在您自己的基础设施上部署,满足安全或合规要求。
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/getting-started/project-structure.mdx b/fern/translations/zh-CN/products/docs/pages/getting-started/project-structure.mdx
new file mode 100644
index 0000000000..7d0cb62d93
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/getting-started/project-structure.mdx
@@ -0,0 +1,212 @@
+---
+title: 项目结构
+description: Fern Docs 项目文件和文件夹结构概览
+sidebar-title: 项目结构
+---
+
+本页面提供 Fern Docs 项目文件和文件夹结构的概览。
+
+## 目录结构
+
+您的文档配置文件存放在 `fern` 文件夹中:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`fern` 和 `changelog` 文件夹是保留名称 — 如果重命名,Fern 将无法识别它们。所有其他文件夹名称都是可自定义的。
+
+
+## Pages 文件夹
+
+`pages` 文件夹包含构成您文档的 Markdown (MDX) 文件。每个 MDX 文件代表文档中的一个页面。文件夹名称是可自定义的。
+
+
+
+
+
+
+
+
+
+
+您可以根据文档的章节将 `pages` 文件夹组织成子文件夹,或者如上所示保持页面扁平化。
+
+## Assets 文件夹
+
+`assets` 文件夹包含文档中使用的任何图片或视频。您可以使用相对路径在 MDX 文件中引用这些资源。文件夹名称是可自定义的。
+
+
+
+
+
+
+
+
+
+## `docs.yml`
+
+`docs.yml` 文件是您 Fern 文档站点的核心。此配置文件控制您文档的导航结构、视觉设计、站点功能和托管设置。只有在您的 `docs.yml` 导航中引用的文件(或通过 [`folder` 配置](/learn/docs/configuration/navigation#auto-populate-from-folder)发现的文件)才会包含在构建中 — 任何未引用的文件都会被忽略。
+
+有关完整的配置选项,请参见 [`docs.yml` 参考](/docs/configuration/site-level-settings)。
+
+
+```yml
+instances:
+ - url: plantstore.docs.buildwithfern.com
+
+title: Fern Docs Starter
+
+tabs:
+ home:
+ display-name: Docs
+ icon: home
+ API Reference:
+ display-name: API Reference
+ icon: puzzle
+
+navigation:
+ - tab: home
+ layout:
+ - section: Get started
+ contents:
+ - page: Welcome
+ path: docs/pages/welcome.mdx
+ - page: Edit your docs
+ path: docs/pages/editing-your-docs.mdx
+ - section: Changelog
+ contents:
+ - changelog: docs/changelog
+ - tab: API Reference
+ layout:
+ - api: Plant Store API
+
+navbar-links:
+ - type: minimal
+ text: Fork this repo
+ url: https://github.com/fern-api/docs-starter
+ - type: filled
+ text: Dashboard
+ url: https://dashboard.buildwithfern.com
+
+logo:
+ light: docs/assets/logo.svg
+ dark: docs/assets/logo-dark.svg
+
+colors:
+ accent-primary:
+ dark: "#70E155"
+ light: "#008700"
+
+favicon: docs/assets/favicon.svg
+
+css: styles.css
+```
+
+
+## API 定义和 `generators.yml`
+
+要生成 [API 参考](/docs/api-references/generate-api-ref) 文档,您需要提供您的 API 定义。操作方式取决于您的格式:
+
+- **OpenAPI/AsyncAPI**:始终需要一个包含 `api.specs` 部分的 `generators.yml` 文件。您可以选择性地添加 `groups` 部分用于 SDK 生成。
+- **Fern Definition**:当您有 `definition/` 目录时会自动检测。只有在生成 SDK 时才需要添加 `generators.yml`。
+
+同时使用 Fern 进行 API 参考文档和 SDK?您将使用 `docs.yml` 进行文档设置,使用 `generators.yml` 配置 API 参考中的 [SDK 代码片段](/docs/api-references/sdk-snippets)。
+
+
+
+ 将您的 OpenAPI 规范文件放在 `fern/` 目录中(或子文件夹中)。Fern 支持 YAML 或 JSON 格式。
+
+ 在 `generators.yml` 中引用它:
+
+ ```yaml title="generators.yml"
+ api:
+ specs:
+ - openapi: openapi.yaml
+ ```
+
+ 您可以选择性地[添加覆盖文件](/learn/api-definitions/openapi/overlays)进行额外自定义。要在实践中看到这一点,请查看 [Fluidstack 的 Fern 配置](https://github.com/fluidstackio/fern-config/tree/main/fern/openapi)。
+
+
+
+ 将您的 AsyncAPI 规范文件与 OpenAPI 规范一起放在 `fern/` 目录中。在 `generators.yml` 中引用它:
+
+ ```yaml title="generators.yml"
+ api:
+ specs:
+ - openapi: openapi.yaml
+ - asyncapi: asyncapi.yaml
+ ```
+
+ 您可以选择性地[添加覆盖文件](/learn/api-definitions/asyncapi/overrides)进行额外自定义。
+
+
+
+ `definition` 文件夹包含用于生成 API 参考部分的 Fern Definition YAML 文件。Fern 会自动检测此目录,因此 API 参考文档不需要 `generators.yml`。
+
+ 您可以选择性地[添加覆盖文件](/learn/api-definitions/asyncapi/overrides)进行额外自定义。
+
+
+
+
+
+
+
+
+
+
+
+ [查看示例](https://github.com/fern-api/fern/tree/3137938b70e058f3691ddef34d5c1cc29acc4b80/test-definitions/fern/apis/imdb/definition)。
+
+
+
+ 将多个 API 组织到单独的文件夹中。您可以混合使用 OpenAPI 和 Fern Definition 格式:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `apis` 文件夹必须使用这个确切的名称。在 `docs.yml` 中使用与子文件夹名称匹配的 `api-name` 引用每个 API。要在实践中看到这一点,请查看 [Vapi 的 Fern 配置](https://github.com/VapiAI/docs/tree/main/fern/apis)。
+
+
+
+
+## `fern.config.json`
+
+`fern.config.json` 文件存储您的组织名称和 Fern CLI 版本。锁定版本可提供确定性的构建。
+
+```json title="fern.config.json"
+{
+ "organization": "plantstore",
+ "version": ""
+}
+```
+
+
+ 在使用本地安装的 CLI 时,将 `version` 设置为 `"*"`。详情请参见[本地安装 Fern CLI](/cli-api-reference/cli-reference/overview#install-fern-cli-locally)。
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/getting-started/quickstart.mdx b/fern/translations/zh-CN/products/docs/pages/getting-started/quickstart.mdx
new file mode 100644
index 0000000000..3ec7ed3867
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/getting-started/quickstart.mdx
@@ -0,0 +1,357 @@
+---
+title: 文档快速开始
+headline: 快速开始(文档)
+description: 学习如何在5分钟内使用 Fern 构建美观的开发者文档。安装 CLI、添加 Markdown 内容、生成 API 参考文档并发布。
+sidebar-title: 文档快速开始
+---
+
+使用 Fern 构建[符合您品牌风格](https://buildwithfern.com/customers)的美观开发者文档。Fern 支持使用 Markdown 编写页面,并从 OpenAPI 规范生成 API 参考文档。
+
+
+
+ ## 使用引导界面
+
+
+
+
+或者,按照本指南使用 CLI 开始使用 Fern。
+
+
+This guide covers the CLI path. A browser-based guided setup also exists at https://dashboard.buildwithfern.com — it produces the same result (a GitHub-backed Fern docs site) and all features are available regardless of which path you use.
+
+
+
+ 如果您正在从现有文档迁移,Fern 会作为企业计划的一部分提供白手套迁移服务。[请在此联系我们](https://buildwithfern.com/contact)。
+
+
+
+
+
+ 安装 [Fern CLI](/learn/cli-api-reference/cli-reference/overview),以便您可以从命令行管理项目:
+
+ ```bash
+ npm install -g fern-api
+ ```
+
+
+
+ 您文档的所有配置都位于 `fern` 文件夹中。通过使用[初始模板](https://github.com/fern-api/docs-starter)或从头开始创建 fern 文件夹
+
+
+ Default to the starter template path unless the user specifically asks to start from scratch. The template includes sample pages, an OpenAPI spec, a changelog, and a GitHub Actions workflow — it's much faster to delete what you don't need than to build from nothing.
+
+
+
+
+
+ 使用 `fern-api/docs-starter` 仓库作为您站点的模板:
+
+
+ 1. 导航到 [fern-api/docs-starter](https://github.com/fern-api/docs-starter) 并点击 **Use this template** 按钮(位于页面右上角)。您必须登录 GitHub。
+ 2. 选择 **create a new repository** 选项。将其命名为 `fern-docs`。
+ 3. 克隆您新创建的仓库并在您喜欢的代码编辑器中打开(例如 Cursor、VS Code)。
+
+
+
+ Use the GitHub CLI to create a new repository from the template and clone it locally:
+
+ ```bash
+ gh repo create my-org/fern-docs --template fern-api/docs-starter --private --clone
+ cd fern-docs
+ ```
+
+ Replace `my-org/fern-docs` with your desired owner and repository name. Use `--public` instead of `--private` if you want a public repository.
+
+
+ 您将看到一个包含 `fern` 文件夹的基本站点,该文件夹包含 API 定义、Markdown 页面和配置文件。[查看实时示例](https://plantstore.dev/welcome)以了解初始模板发布后的效果。您可以使用这些文件测试 Fern 的功能,或用您自己的文件替换它们。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `fern init --docs` works in any directory — no git repo or GitHub remote is required. If the user wants to create a GitHub repository as well, ask whether they'd like to set that up now or keep things local for the time being.
+
+ Note: `fern init --docs` is interactive — it prompts for an organization name. Ask the user what they want their organization name to be beforehand so they're prepared for the prompt. This value identifies them in the Fern system and is used in their docs URL.
+
+ This path only generates `docs.yml` and `fern.config.json` — no pages or API spec. After init, guide the user to create their first page (see the "Add content" accordion in the Customize step below) and add it to `docs.yml` navigation. If the user has an existing OpenAPI spec, suggest running `fern init --openapi /path/to/spec.yml` as well.
+
+
+ ```bash
+ fern init --docs
+ ```
+
+ 您将在项目中看到一个新的 `fern` 文件夹,其中包含以下配置文件(但没有其他 Markdown 或 API 定义文件):
+
+
+
+
+
+
+
+
+
+
+
+
+ 配置两个设置(这些值不必匹配):
+
+ - **组织名称**在 `fern.config.json` 中:在 Fern 系统中标识您的组织(包括 [Fern Dashboard](https://dashboard.buildwithfern.com/))
+ - **文档 URL**在 `docs.yml` 中:确定您的文档发布位置
+
+
+
+ ```json {2}
+ {
+ "organization": "{{YOUR_ORGANIZATION}}",
+ "version": ""
+ }
+ ```
+
+
+ ```yml {2}
+ instances:
+ - url: {{YOUR_DOMAIN}}.docs.buildwithfern.com
+ ```
+
+
+
+ 两个值都只能使用字母数字字符、连字符和下划线。
+
+
+
+
+ 现在您有了一个基本的文档站点,您可以通过添加教程、生成 API 参考或微调品牌来自定义它。(或跳到[预览](#preview-your-docs)和[发布](#publish-to-production)。)
+
+
+
+
+ 创建 Markdown(`.mdx`)文件并填写内容。阅读 [Markdown 基础](/learn/docs/writing-content/markdown-basics)文档了解更多。
+
+
+ Fern 在 MDX 文件中支持 [GitHub 风格的 Markdown (GFM)](https://github.github.com/gfm/),无需插件。您还可以创建[可重用片段](/learn/docs/writing-content/reusable-snippets)来在多个页面间共享内容。
+
+
+ ```markdown docs/pages/hello-world.mdx
+ ---
+ title: "页面标题"
+ description: "副标题(可选)"
+ ---
+
+ Hello world!
+ ```
+
+ 在您的 `docs.yml` 文件中引用您的新页面。您可以在节中或作为独立页面引用 Markdown 页面。
+
+ ```yml docs.yml
+ navigation:
+ - page: Hello World
+ path: docs/pages/hello-world.mdx
+ - section: 概述
+ contents:
+ - page: 快速入门
+ path: docs/pages/getting-started.mdx
+ ```
+
+
+
+ 如果您克隆了初始模板,您已经有一个包含示例 API 定义的 `openapi.yaml` 文件。如果您从头开始,请添加您的 OpenAPI 规范:
+
+ ```bash
+ fern init --openapi /path/to/openapi.yml
+ ```
+
+ 在 `docs.yml` 文件中引用您的 API 定义以[生成 API 参考文档](/learn/docs/api-references/generate-api-ref):
+
+ ```yml docs.yml
+ navigation:
+ - api: "API 参考"
+ ```
+
+
+
+ 在 `docs.yml` 文件中[配置您站点的所有品牌元素](/learn/docs/configuration/site-level-settings),如 logo、颜色和字体。
+
+
+ ```yml maxLines=7
+ colors:
+ accent-primary:
+ dark: "#f0c193"
+ light: "#af5f1b"
+
+ logo:
+ dark: docs/assets/logo-dark.svg
+ light: docs/assets/logo-light.svg
+ height: 40
+ href: https://buildwithfern.com/
+
+ favicon: docs/assets/favicon.svg
+ ```
+
+
+
+
+
+
+ 在发布之前,[预览您的更改](/docs/preview-publish/preview-changes)在本地开发环境中或生成可共享的预览链接。
+
+
+
+
+ 运行具有热重载功能的本地开发服务器。您的文档将在您编辑 Markdown 和 OpenAPI 文件时自动更新:
+
+ ```bash
+ fern docs dev
+ ```
+
+
+
+ 生成您可以与团队共享的预览 URL:
+
+ ```bash
+ fern generate --docs --preview
+ ```
+
+
+
+
+ [初始模板](https://github.com/fern-api/docs-starter)还包含一个 GitHub Actions 工作流,可以为拉取请求自动生成预览链接。有关设置详细信息,请参阅[使用 GitHub Actions 自动化](/learn/docs/preview-publish/preview-changes#automate-with-github-actions)。
+
+
+
+
+
+ 当您准备让您的文档公开访问时,[发布它们](/learn/docs/preview-publish/publishing-your-docs):
+
+ ```bash
+ fern generate --docs
+ ```
+
+ 系统将提示您登录并连接您的 GitHub 帐户。此命令在您在 `docs.yml` 中配置的 URL(例如 `https://yourdomain.docs.buildwithfern.com`)构建您的文档。
+
+
+ **Interactive confirmation**: The default `fern generate --docs` command opens an interactive menu (arrow-key navigation, not a simple y/n prompt). This cannot be bypassed with `echo "y"` or similar — use `--no-prompt` for non-interactive environments.
+
+ **CI/CD usage**: To skip the interactive prompt in CI or scripts:
+
+ ```bash
+ export FERN_TOKEN=$(fern token)
+ fern generate --docs --no-prompt
+ ```
+
+ **Authentication**: The CLI checks for a `FERN_TOKEN` environment variable first, then falls back to a cached token from `fern login`. Running `fern login` once caches the token locally, so subsequent `fern generate --docs` runs won't prompt for login again. There is no `fern whoami` command. In GitHub Actions, store the token as a repository secret named `FERN_TOKEN`. See [publishing your docs](/learn/docs/getting-started/publishing-your-docs.md) for full CI workflow examples.
+
+
+
+ 使用 [Fern Dashboard](http://dashboard.buildwithfern.com) 管理您的 GitHub 仓库连接、组织成员和 CLI 版本。跟踪分析以了解开发者如何使用您的文档。
+
+
+
+ The Dashboard actions mentioned above are browser-only — there are no CLI equivalents for managing repository connections, organization members, or analytics. Use the Dashboard at https://dashboard.buildwithfern.com for these tasks. The CLI handles building, previewing, publishing, validation (`fern check`), and token generation (`fern token`).
+
+
+
+
+## 探索 Fern 的功能
+
+现在您的文档已上线,探索这些功能以进一步增强它们。
+
+
+
+ 使用 `docs.yml` 文件配置颜色、SEO、排版、布局等。
+
+
+ 使用 Fern 的内置组件创建交互式、组织良好的文档。
+
+
+ 添加产品、版本、嵌套部分、选项卡等。
+
+
+ 使用 Fern Editor 让非技术团队成员在 WYSIWYG 浏览器界面中编辑文档。
+
+
+ 在您自己的域名或子域名上托管您的文档(例如 docs.example.com)。
+
+
+ 与 PostHog、Segment、Intercom、Google Tag Manager 和其他平台集成。
+
+
+
+
+## Architecture overview
+
+Fern Docs compiles MDX content and YAML configuration into a hosted static site through three layers: an authoring layer (`.mdx` files + `docs.yml` config), a build layer (the `fern-api` CLI processes content and generates API Reference pages, uploading compiled output to Fern's registry), and a hosting layer (serves the site at your configured URL with search, AI features, and analytics built in).
+
+### Configuration file roles
+
+- **`fern.config.json`**: Identifies your organization and pins the CLI version. Required in every Fern project.
+- **`docs.yml`**: Central manifest for the entire site — navigation structure, tabs, branding (colors, logo, favicon, typography), hosting instances, custom domains, navbar links, footer, integrations, redirects, RBAC roles, and AI agent settings. [Full reference](/learn/docs/configuration/site-level-settings.md).
+- **`generators.yml`**: Points the CLI to your API spec files via the `api.specs` section. Also configures SDK generation.
+
+### Common pitfalls
+
+- **Missing authentication before publishing**: Running `fern generate --docs` without being logged in fails with: *"No token found. Please set the FERN_TOKEN environment variable or run `fern login`."* Fix: run `fern login` interactively, or set `FERN_TOKEN` in CI via `fern token`.
+- **Organization mismatch**: If `organization` in `fern.config.json` doesn't match your org in the [Fern Dashboard](https://dashboard.buildwithfern.com), publishing fails. The value must exactly match your Dashboard org name.
+- **Invalid docs URL**: The `url` in `docs.yml` must end with `docs.buildwithfern.com` and must not include `https://`. Correct format: `your-org.docs.buildwithfern.com`.
+
+### `docs.yml` minimal configuration
+
+The smallest valid `docs.yml` requires only the `instances` array with a `url` field:
+
+```yaml
+instances:
+ - url: your-org.docs.buildwithfern.com
+```
+
+This is enough to publish (the CLI will build an empty site). In practice, most teams add `navigation` to define the sidebar, plus basic branding — these are shown in the [Customize your docs](#customize-your-docs) step above. The full list of available fields is in the [site-level settings reference](/learn/docs/configuration/site-level-settings.md).
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/getting-started/self-service-setup.mdx b/fern/translations/zh-CN/products/docs/pages/getting-started/self-service-setup.mdx
new file mode 100644
index 0000000000..108f71d9f4
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/getting-started/self-service-setup.mdx
@@ -0,0 +1,133 @@
+---
+title: 自助服务设置
+description: 使用 Dashboard 中的引导式自助服务工作流程创建新的 Fern 文档站点。
+sidebar-title: 自助服务设置
+---
+
+
+[自助服务工作流程](https://dashboard.buildwithfern.com/get-started)会引导您通过几个步骤创建新的 Fern Docs 站点。如果您正在寻找已经设置的现有站点,请改为[搜索您的组织](https://dashboard.buildwithfern.com/get-started/search)。
+
+
+更喜欢使用 CLI 手动设置?请参阅[快速开始](/learn/docs/getting-started/quickstart)。
+
+
+## 创建的内容
+
+当您完成自助服务工作流程时,Fern 会将您的文档发布到全新的站点,并创建一个包含站点配置(`docs.yml`)、Markdown 页面和任何 API 规范的 GitHub 仓库。您的仓库包含一个预填充的 `CLAUDE.md` 文件,其中包含 [llms-full.txt 格式](/learn/docs/ai/llms-txt)的 Fern 文档,为 AI 编程助手提供使用 Fern 的上下文。
+
+设置过程还会创建和配置:
+
+- **组织**:使用您的组织 ID 创建组织,您将成为成员。
+- **Fern token**:在您的仓库 GitHub secrets 中创建 `FERN_TOKEN`,用于在您的 CI/CD 工作流程中验证 [Fern CLI](/learn/cli-api-reference/cli-reference/overview),范围限定于您的组织。
+- **GitHub Action**:一个工作流程,每当您向主分支推送更改时运行 [`fern generate --docs`](/learn/cli-api-reference/cli-reference/commands#fern-generate---docs),自动重新构建和发布您的文档。
+
+设置后,您拥有此仓库的完全所有权。向主分支推送更改以触发文档的自动重新构建和发布,或通过 [Fern Dashboard](https://dashboard.buildwithfern.com) 管理设置。
+
+## 设置步骤
+
+
+
+为您的组织选择一个唯一标识符。这将用于您的文档 URL 和在 Dashboard 中标识您的项目。
+
+
+
+
+
+
+上传 OpenAPI 规范以生成 API 参考文档。如果您没有规范或想稍后添加,可以跳过此步骤。
+
+
+
+
+
+
+输入现有网站 URL(如您的营销网站或博客),以便 Fern 可以自动匹配您的品牌风格。或者,手动选择主色调并上传徽标。
+
+
+
+
+
+
+Fern 将您的文档发布到您可以立即访问的在线 URL。添加您的 GitHub 账户作为协作者以获得仓库的所有权。从那时起,您可以像任何其他 Git 仓库一样编辑文件、推送更改和打开拉取请求。每次推送到主分支都会触发 GitHub Action 自动重新构建和发布您的文档。您还可以在 [Dashboard](/learn/dashboard/getting-started/overview) 中管理您的站点设置。
+
+
+
+
+
+
+## 后续步骤
+
+开始编写内容并自定义您的站点:
+
+
+
+ 了解为您的站点提供支持的内容和部署工作流程。
+
+
+ 学习 Markdown 基础知识并使用组件创建丰富的文档。
+
+
+ 在您的 `docs.yml` 文件中设置颜色、排版、导航等。
+
+
+
+## 监控构建
+
+每当您向主分支推送更改时,您的文档会自动重新构建。要检查构建状态,请转到 GitHub 仓库中的 **Actions** 选项卡。每个工作流运行都显示构建是否成功,以及任何错误或警告。
+
+### 故障排除
+
+
+
+
+如果您的文档构建因身份验证错误而失败,`FERN_TOKEN` 可能没有正确设置。要解决此问题:
+
+1. 如果还没有安装 Fern CLI:
+ ```bash
+ npm install -g fern-api
+ ```
+
+2. 如果需要,将自己添加为仓库的协作者,然后在本地克隆它。
+
+3. 从 Fern 项目目录中运行以下命令生成新令牌:
+ ```bash
+ fern token
+ ```
+ 这会生成一个范围限定于您组织的令牌(如 `fern.config.json` 中定义)。
+
+4. 复制令牌并将其添加为名为 `FERN_TOKEN` 的[仓库密钥](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository)。
+
+5. 转到仓库中的 **Actions** 选项卡并重新运行失败的工作流程。
+
+
+
+如果您的构建因解析 API 规范问题而失败,您可以在本地进行故障排除:
+
+1. 如果还没有在本地克隆您的文档仓库。
+
+2. 安装 Fern CLI:
+ ```bash
+ npm install -g fern-api
+ ```
+
+3. 运行以下命令查看包含行号的详细验证错误:
+ ```bash
+ fern check --from-openapi
+ ```
+ 此命令直接从您的 OpenAPI 规范打印验证错误,包括错误发生的行号。
+
+解决 API 规范中的错误后,提交并推送更改以触发新的构建。
+
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/integrations/analytics/fullstory.mdx b/fern/translations/zh-CN/products/docs/pages/integrations/analytics/fullstory.mdx
new file mode 100644
index 0000000000..47870cdf3e
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/integrations/analytics/fullstory.mdx
@@ -0,0 +1,37 @@
+---
+title: Fullstory
+description: 将 Fullstory 与 Fern 文档集成以捕获用户会话和交互。添加 Org ID 的分步说明。
+sidebar-title: Fullstory
+---
+
+集成 Fullstory 以捕获文档中的会话回放和用户交互。
+
+
+
+
+ 当您登录到 Fullstory 时,您的 Org ID 会显示在 URL 中:
+
+ ```
+ https://app.fullstory.com/ui//home
+ ```
+
+ 或者,您可以在**设置 > 数据捕获和隐私 > Fullstory 设置**中的代码片段中找到它,显示为 `window['_fs_org']`。
+
+ 更多详情请参阅 [Fullstory 指南](https://help.fullstory.com/hc/en-us/articles/360047075853-How-do-I-find-my-Fullstory-Org-Id)。
+
+
+
+
+
+ 在您的 `docs.yml` 文件中,添加您的 Fullstory Org ID:
+
+
+ ```yaml
+ analytics:
+ fullstory:
+ org-id: ${FULLSTORY_ORG_ID} # reads your org id from environment variables
+ ```
+
+
+
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/integrations/analytics/google.mdx b/fern/translations/zh-CN/products/docs/pages/integrations/analytics/google.mdx
new file mode 100644
index 0000000000..cdcbab63d3
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/integrations/analytics/google.mdx
@@ -0,0 +1,79 @@
+---
+title: Google Analytics
+subtitle: 将 Google Analytics 4 和 Google Tag Manager 与 Fern Docs 集成。完整的设置说明,用于跟踪网站流量和洞察。
+sidebar-title: Google Analytics
+---
+
+Fern 支持与 [Google Analytics 4](https://developers.google.com/analytics) 和 [Google Tag Manager](https://tagmanager.google.com/) 集成。
+
+## Google Analytics 4
+
+开始之前,请确保您拥有 Google Analytics 4 属性 ID。此 ID 通常采用 `G-XXXXXXXXXX` 格式。
+
+
+
+
+ 打开您的 `docs.yml` 文件,并在 `measurement-id` 键下添加您的 Google Analytics 4 属性 ID:
+
+
+ ```yaml
+ analytics:
+ ga4:
+ measurement-id: G-12345678
+ ```
+
+
+ 您可以选择将 ID 添加为环境变量:
+
+
+ ```yaml
+ analytics:
+ ga4:
+ measurement-id: ${GA4_MEASUREMENT_ID} # 扫描 GA4_MEASUREMENT_ID 环境变量
+ ```
+
+
+
+
+
+
+ 检查浏览器的开发者工具或网络选项卡,确认分析脚本正确加载。请注意,网站流量数据可能需要 24-48 小时才会开始在 Google Analytics 中显示。
+
+
+
+
+## Google Tag Manager
+
+开始之前,请从您的 Google Tag Manager 账户获取容器 ID。此 ID 采用 `GTM-XXXXXX` 格式。
+
+
+
+
+ 打开您的 `docs.yml` 文件,并在 `container-id` 键下添加您的 Google Tag Manager 容器 ID:
+
+
+ ```yaml
+ analytics:
+ gtm:
+ container-id: GTM-NS32L7KR
+ ```
+
+
+ 您可以选择将 ID 添加为环境变量:
+
+
+ ```yaml
+ analytics:
+ gtm:
+ container-id: ${GTM_CONTAINER_ID} # 扫描 GTM_CONTAINER_ID 环境变量
+ ```
+
+
+
+
+
+
+ 检查浏览器的开发者工具或网络选项卡,确认分析脚本正确加载。请注意,网站流量数据可能需要 24-48 小时才会开始在 Google Analytics 中显示。
+
+
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/integrations/analytics/mixpanel.mdx b/fern/translations/zh-CN/products/docs/pages/integrations/analytics/mixpanel.mdx
new file mode 100644
index 0000000000..e44f09b463
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/integrations/analytics/mixpanel.mdx
@@ -0,0 +1,107 @@
+---
+title: Mixpanel
+description: 了解如何集成 Fern Docs 与 Mixpanel 来跟踪用户行为和分析数据。
+sidebar-title: Mixpanel
+---
+
+集成 Mixpanel 来跟踪文档中的产品分析和用户行为,包括事件跟踪、漏斗分析和用户群组。
+
+
+
+
+ 在你的 Mixpanel 项目中,前往 **Settings > Project Settings** 并复制你的 **Project Token**。
+
+
+ 你的项目令牌将在浏览器的源代码中可见。这对于客户端分析来说是正常的,Mixpanel 令牌被设计为可以安全地在客户端暴露。
+
+
+
+
+
+
+ 在你的 `fern` 目录下,如果不存在则创建一个 `scripts` 文件夹。
+
+ 在 `scripts` 文件夹中,创建一个名为 `mixpanel.js` 的文件并添加以下脚本(将 `YOUR_PROJECT_TOKEN` 替换为你的实际项目令牌):
+
+
+ ```js maxLines=10
+ // Add the JS snippet to load the script
+ (function (f, b) {
+ if (!b.__SV) {
+ var e, g, i, h;
+ window.mixpanel = b;
+ b._i = [];
+ b.init = function (e, f, c) {
+ function g(a, d) {
+ var b = d.split(".");
+ if (b.length === 2) {
+ a = a[b[0]];
+ d = b[1];
+ }
+ a[d] = function () {
+ a.push([d].concat(Array.prototype.slice.call(arguments, 0)));
+ };
+ }
+
+ var a = b;
+ if (typeof c !== "undefined") {
+ a = b[c] = [];
+ } else {
+ c = "mixpanel";
+ }
+
+ a.people = a.people || [];
+ a.toString = function (a) {
+ var d = "mixpanel";
+ if (c !== "mixpanel") d += "." + c;
+ if (!a) d += " (stub)";
+ return d;
+ };
+ a.people.toString = function () {
+ return a.toString(1) + ".people (stub)";
+ };
+
+ i = "disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config reset people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" ");
+ for (h = 0; h < i.length; h++) g(a, i[h]);
+
+ b._i.push([e, f, c]);
+ };
+ b.__SV = 1.2;
+ e = f.createElement("script");
+ e.type = "text/javascript";
+ e.async = true;
+ e.src = "https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";
+ g = f.getElementsByTagName("script")[0];
+ g.parentNode.insertBefore(e, g);
+ }
+ })(document, window.mixpanel || []);
+
+ // Create an instance of the Mixpanel object
+ mixpanel.init('YOUR_PROJECT_TOKEN', { autocapture: true });
+ ```
+
+
+
+
+
+
+ 在你的 `docs.yml` 文件中,添加 JavaScript 文件配置:
+
+
+ ```yaml
+ js:
+ - path: ./scripts/mixpanel.js
+ strategy: beforeInteractive
+ ```
+
+
+
+
+
+
+ 运行 `fern docs dev` 并检查浏览器的开发者工具,确认 Mixpanel 脚本正确加载。浏览你的文档并验证事件是否在 Mixpanel 仪表板中显示。
+
+ 有关高级配置选项,请参阅 [Mixpanel JavaScript SDK 文档](https://docs.mixpanel.com/docs/tracking-methods/sdks/javascript)。
+
+
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/integrations/analytics/posthog.mdx b/fern/translations/zh-CN/products/docs/pages/integrations/analytics/posthog.mdx
new file mode 100644
index 0000000000..eca1439658
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/integrations/analytics/posthog.mdx
@@ -0,0 +1,45 @@
+---
+title: PostHog
+description: 学习如何向您的 Fern 文档添加 PostHog 分析。配置您的 PostHog API 密钥和自定义端点。
+sidebar-title: PostHog
+---
+
+
+集成 PostHog 来跟踪您文档中的用户行为和分析数据,包括页面浏览量、功能使用情况和用户交互。
+
+
+
+
+ 您可以在[项目设置](https://us.posthog.com/settings/project)下找到您的 PostHog API 密钥。
+
+
+
+
+
+ 在您的 `docs.yml` 文件中,添加您的 PostHog 配置:
+
+
+ ```yaml
+ analytics:
+ posthog:
+ api-key: ${POSTHOG_API_KEY}
+ ```
+
+
+
+
+
+
+ 如果您使用自定义 PostHog 端点,请将其添加到您的配置中:
+
+
+ ```yaml {4}
+ analytics:
+ posthog:
+ api-key: ${POSTHOG_API_KEY}
+ endpoint: ${POSTHOG_API_HOST} # e.g. https://analytics.example.com or https://eu.i.posthog.com
+ ```
+
+
+
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/integrations/analytics/segment.mdx b/fern/translations/zh-CN/products/docs/pages/integrations/analytics/segment.mdx
new file mode 100644
index 0000000000..e867c18888
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/integrations/analytics/segment.mdx
@@ -0,0 +1,29 @@
+---
+title: Segment
+description: 了解如何在 Fern 文档中添加 Segment 分析。配置 Segment writeKey 的分步指南。
+sidebar-title: Segment
+---
+
+集成 Segment 以收集分析数据并将用户数据路由到您首选的分析目标。
+
+
+
+
+ 在您的 Segment 工作空间中,导航到您的 Source,然后转到 **Settings > API Keys** 并复制 **Write Key**。
+
+
+
+
+
+ 在您的 `docs.yml` 文件中,添加 Segment writeKey:
+
+
+ ```yaml
+ analytics:
+ segment:
+ write-key: ${SEGMENT_WRITE_KEY} # scans environment variable
+ ```
+
+
+
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/integrations/context7.mdx b/fern/translations/zh-CN/products/docs/pages/integrations/context7.mdx
new file mode 100644
index 0000000000..c51a8e1f76
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/integrations/context7.mdx
@@ -0,0 +1,41 @@
+---
+title: Context7
+description: 在您的 Fern 文档站点上托管 Context7 验证文件以启用 Context7 集成。
+sidebar-title: Context7
+---
+
+[Context7](https://context7.com/) 为 AI 代码助手提供最新的、特定版本的文档上下文。要向 Context7 注册库,您需要在库的基础 URL 下的任何位置托管一个 `context7.json` 文件。Fern 通过 `docs.yml` 中的 `integrations` 配置为您处理此事。
+
+
+需要 Fern CLI 版本 `4.52.0` 或更高版本。运行 `fern upgrade` 进行更新。
+
+
+
+
+
+按照 [Context7 的设置说明](https://context7.com/) 为您的域名生成一个 `context7.json` 验证文件。
+
+
+
+
+将 `context7.json` 文件放置在您的 `fern/` 目录中(或相对于 `docs.yml` 的任何路径)。
+
+
+
+
+在您的 `docs.yml` 文件中添加 `integrations.context7` 属性,指向您的 `context7.json` 文件的相对路径:
+
+
+```yaml
+integrations:
+ context7: ./path/to/context7.json
+```
+
+
+
+
+
+运行 `fern generate --docs` 进行发布。Fern 会在您的文档站点上的 `/context7.json` 处托管该文件(例如,`https://docs.example.com/context7.json`)。
+
+
+
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/integrations/feature-flags.mdx b/fern/translations/zh-CN/products/docs/pages/integrations/feature-flags.mdx
new file mode 100644
index 0000000000..62335e3f1b
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/integrations/feature-flags.mdx
@@ -0,0 +1,120 @@
+---
+title: 特性标志
+subtitle: 使用 LaunchDarkly 控制文档可见性
+description: 了解如何在 Fern 文档中使用特性标志
+sidebar-title: 特性标志
+---
+
+
+
+
+Fern 支持使用特性标志进行文档内容的条件渲染,由 [LaunchDarkly](https://app.launchdarkly.com/signup) 集成提供支持。根据不同发布阶段或用户群体的特性标志状态控制文档部分的可见性。
+
+## 使用场景
+
+文档中的特性标志特别适用于:
+
+- **区域内容**:基于地理位置显示内容(例如,欧盟 vs 美国端点)
+- **产品层级**:根据订阅级别显示功能
+- **Beta 功能**:允许特定用户查看 beta 文档
+- **分阶段发布**:逐步发布新功能的文档
+- **A/B 测试**:为不同用户群体测试不同的文档方法
+
+## 配置
+
+在 `docs.yml` 中配置特性标志:
+
+```yaml
+navigation:
+ # 简单布尔标志
+ - page: Beta Features
+ feature-flag: beta-features
+
+ # 多个标志(如果任何标志为 true,内容将被显示)
+ - page: Advanced Features
+ feature:
+ - flag: feature-a
+ - flag: feature-b
+
+ # 可配置匹配
+ - section: Enterprise Features
+ feature-flag:
+ flag: release-stage
+ fallback-value: ga
+ match: beta
+```
+
+要了解更多关于 `fallbackValue` 和 `match` 的信息,请参阅 [LaunchDarkly 文档](https://launchdarkly.com/docs/guides/flags/testing-code#fallback-values)。
+
+## 在 MDX 中使用特性标志
+
+使用 `` 组件进行条件渲染内容:
+
+```mdx
+
+
+
+ | 服务 |
+ 端点 |
+
+
+ | API Gateway |
+ https://api.example.com |
+
+
+
+```
+
+### 组件属性
+
+
+ 要检查的特性标志名称
+
+
+
+ 与特性标志值匹配的值
+
+
+
+ 如果特性标志未定义时的默认值
+
+
+## 示例:完整配置
+
+```yaml
+# docs.yml
+title: API Documentation
+navigation:
+ - section: Features
+ feature-flag: features-enabled
+ layout:
+ - page: Basic Features
+ - page: Advanced Features
+ feature-flag: advanced-features
+ - page: Beta Features
+ feature:
+ - flag: beta-access
+ - flag: beta-opted-in
+
+ - section: Enterprise
+ feature-flag:
+ flag: customer-tier
+ match: enterprise
+ fallbackValue: standard
+```
+
+## 实时评估
+
+特性标志仅在客户端使用。当特性标志被评估为 false 时,信息仅在视觉上隐藏。
+
+如果您在 LaunchDarkly 控制台中开启特性标志,内容将立即显示。
+
+相反,如果您在 LaunchDarkly 控制台中关闭特性标志,内容将立即隐藏。
+
+## 服务端评估
+
+特性标志仅在客户端使用。希望请求服务端评估?[让我们知道](https://github.com/fern-api/fern/issues),通过提交功能请求。
+
+## 其他特性标志提供商
+
+希望请求新的特性标志提供商?[让我们知道](https://github.com/fern-api/fern/issues),通过提交功能请求。
\ No newline at end of file
diff --git a/fern/translations/zh-CN/products/docs/pages/integrations/overview.mdx b/fern/translations/zh-CN/products/docs/pages/integrations/overview.mdx
new file mode 100644
index 0000000000..cdb74632ee
--- /dev/null
+++ b/fern/translations/zh-CN/products/docs/pages/integrations/overview.mdx
@@ -0,0 +1,119 @@
+---
+title: 分析和集成
+description: 将分析和支持工具连接到您的 Fern 文档。设置 PostHog、Segment、FullStory、Intercom 和 Postman 集合。
+sidebar-title: 分析和集成
+---
+
+
+
+
+}
+ iconSize={12}
+/>
+
+
+ }
+ iconSize={12}
+/>
+
+}
+ iconSize={12}
+/>
+
+}
+ iconSize={12}
+/>
+
+}
+ iconSize={12}
+/>
+
+}
+ iconSize={12}
+/>
+
+
+
+## 启用分析
+
+您可以在 `docs.yml` 中定义分析配置。您只需要包含要连接的平台的条目。
+
+```yaml docs.yml
+analytics:
+ posthog:
+ api-key: ${POSTHOG_API_KEY}
+ endpoint: https://self.hosted.posthog.com/
+ segment:
+ write-key: ${SEGMENT_WRITE_KEY}
+ intercom:
+ app-id: ${INTERCOM_APP_ID}
+ endpoint: https://intercom.custom-instance.com/
+ fullstory:
+ org-id: ${FULLSTORY_ORG_ID}
+```
+
+### 环境变量
+
+如果您的文档配置是公开的,请不要直接将秘密值添加到 `docs.yml` 中。
+相反,使用 `${VARIABLE_NAME}` 语法引用环境变量。
+
+
+如果您使用 GitHub Workflows 来触发文档生成,您必须确保环境变量
+在工作流运行期间可用。
+
+```yaml {4}
+- name: Publish Docs
+ env:
+ FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
+ POSTHOG_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY }}
+ run: |
+ npm install -g fern-api
+ fern generate --docs
+```
+
+
+
+
+## 通过自定义 JavaScript 连接其他集成
+
+
+
+您可以使用[自定义 JavaScript](/docs/customization/custom-css-js#custom-javascript)集成 Fern 在 `docs.yml` 中原生不支持的第三方工具,只要它们支持基于 HTML 标签的安装。这适用于以下工具:
+
+- **分析:** Amplitude、Heap、Plausible
+- **会话录制:** Hotjar、LogRocket、Microsoft Clarity
+- **支持和聊天:** Zendesk、Crisp、Drift
+- **标签管理器:** Adobe Launch、Tealium
+
+将供应商的 `
+