Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 7 additions & 4 deletions .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ jobs:
id: generate-docs
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
HEAD_REF: ${{ github.head_ref }}
run: |
OUTPUT=$(fern generate --docs --preview --id "$HEAD_REF" --instance fern-api.docs.buildwithfern.com/learn 2>&1) || true
# Omit --id so each run gets a fresh preview hash. Pinning the id to the
# branch name makes the CLI reuse the same preview deploy across pushes,
# which masks staleness when reviewers re-test after a force-push or a
# CDN cache pin to old content. A throwaway preview per push is cheap
# and lines up 1:1 with the comment posted by this workflow.
OUTPUT=$(fern generate --docs --preview --instance fern-api.docs.buildwithfern.com/learn 2>&1) || true
echo "$OUTPUT"
URL=$(echo "$OUTPUT" | grep -oP 'Published docs to \K.*(?= \()')
echo "preview_url=$URL" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -80,5 +84,4 @@ jobs:
uses: thollander/actions-comment-pull-request@v2.4.3
with:
filePath: comment.md
comment_tag: preview-docs
mode: upsert
mode: create
5 changes: 5 additions & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ instances:

title: Fern Documentation

translations:
- lang: en
default: true
- lang: zh

ai-search:
location:
- docs
Expand Down
2 changes: 1 addition & 1 deletion fern/fern.config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"organization": "fern",
"version": "4.62.3"
"version": "5.7.5"
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec.


## 5.6.1
**`(fix):`** Fix translated docs pages failing to resolve shared snippets (`<Markdown src="..."/>` and `<Code src="..."/>`).
**`(fix):`** Fix translated docs pages failing to resolve shared snippets (Markdown and Code `src` includes).
Snippet references are now resolved before registering translations, with locale-aware loading that prefers
translated snippets (e.g., `translations/zh/snippets/foo.mdx`) when available.

Expand Down
55 changes: 55 additions & 0 deletions fern/translations/zh/fern/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
products:
- display-name: 首页
path: ./products/home/home.yml
subtitle: 提升开发者体验的产品

- slug: sdks
display-name: SDK
path: ./products/sdks/sdks.yml
subtitle: 生成多种语言的客户端库

- slug: docs
display-name: 文档
path: ./products/docs/docs.yml
subtitle: 生成精美的交互式文档网站

- slug: dashboard
display-name: 仪表板
path: ./products/dashboard/dashboard.yml
subtitle: 管理您的 Fern 项目和设置

- slug: cli-api-reference
display-name: CLI 参考
path: ./products/cli-api-reference/cli-api-reference.yml
subtitle: 管理和配置您的 Fern 项目

- slug: api-definitions
display-name: API 定义
path: ./products/api-def/api-def.yml
subtitle: 导入和配置您的 API 规范

- display-name: OpenAPI
subtitle: 定义 REST 和 webhook API

- display-name: AsyncAPI
subtitle: 定义事件驱动和 WebSocket API

- display-name: OpenRPC
subtitle: 定义 JSON-RPC API

- display-name: gRPC
subtitle: 使用 Protocol Buffers 定义 API

- display-name: Fern 定义
subtitle: 使用 Fern 的 YAML 格式定义 API

navbar-links:
- type: minimal
text: 预约演示
url: https://buildwithfern.com/book-demo?utm_source=fern-docs
- type: secondary
text: 登录
url: https://dashboard.buildwithfern.com/login?utm_source=fern-docs
- type: filled
text: 免费开始
url: https://dashboard.buildwithfern.com/sign-up?redirect_on_login=%2Fget-started&utm_source=fern-docs
169 changes: 169 additions & 0 deletions fern/translations/zh/fern/products/api-def/api-def.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
navigation:
- section: 概览
contents:
- page: 什么是 API 定义?
- page: 项目结构
- section: OpenAPI
slug: openapi
contents:
- page: 概览
- page: 覆盖层(Overlays)
- page: 覆盖(Overrides)
- page: 身份验证
- page: 服务器
- page: 同步您的规范
slug: sync-your-open-api-specification
- section: 端点
slug: endpoints
contents:
- page: HTTP JSON 端点
slug: http
- page: Webhooks
- page: 多部分表单上传
slug: multipart
- page: 服务器发送事件
slug: sse
- section: 扩展
slug: extensions
contents:
- page: 概览
- page: API 版本
- page: 受众
- page: 可用性
- page: 基础路径
- page: 默认值
- page: 枚举描述、名称和可用性
slug: enum-descriptions-and-names
- page: 请求与响应示例
- page: API Explorer 控制
- page: 全局请求头
- page: 忽略元素
- page: SDK 方法名称
slug: method-names
- page: SDK 变量
- page: 标签显示名称
- page: 参数名称
- page: 属性名称
- page: 幂等性
- page: 分页
- page: 重试行为
- page: Schema 名称
- page: 服务器名称和 URL 模板化
- section: 集成您的服务器框架
slug: frameworks
contents:
- page: FastAPI
slug: fastapi
- page: generators.yml 参考
- section: AsyncAPI
slug: asyncapi
contents:
- page: 概览
- page: 覆盖(Overrides)
- page: 身份验证
- page: 服务器
- page: 同步您的规范
slug: sync-your-async-api-specification
- section: 通道
slug: channels
contents:
- page: 发布/订阅操作
slug: pubsub
- page: 消息格式
slug: messages
- page: 消息绑定
slug: bindings
- section: 扩展
slug: extensions
contents:
- page: 概览
- page: 受众
- page: 可用性
- page: 请求与响应示例
- page: 忽略元素
- page: 服务器名称
- section: OpenRPC
slug: openrpc
contents:
- page: 概览
- page: 覆盖(Overrides)
- page: 身份验证
- page: 服务器
- page: 同步您的规范
slug: sync-your-open-rpc-specification
- section: 方法
slug: methods
contents:
- page: JSON-RPC 方法
slug: rpc-methods
- section: 扩展
slug: extensions
contents:
- page: 概览
- page: 受众
- page: 可用性
- page: 请求与响应示例
- page: 忽略元素
- page: SDK 方法名称
slug: method-names
- page: SDK 组名称
- page: 服务器名称
- section: gRPC
slug: grpc
contents:
- page: 概览
- page: 覆盖(Overrides)
- page: 身份验证
- page: 服务器
- page: 同步您的规范
slug: sync-your-g-rpc-specification
- section: 服务
slug: services
contents:
- page: gRPC 服务
slug: grpc-services
- page: 流式传输
slug: streaming
- page: 错误处理
slug: errors
- page: generators.yml 参考
- section: Fern 定义
slug: ferndef
contents:
- page: 概览
- page: 身份验证
- page: 类型
- section: 端点
contents:
- page: 概览
- page: HTTP JSON 端点
slug: http
- page: 多部分表单上传
slug: multipart
- page: 字节
slug: bytes
- page: 服务器发送事件
slug: sse
- section: 高级
contents:
- page: Webhooks
- page: WebSockets
slug: websockets
- page: 错误
- page: 导入
- page: 示例
- page: 受众
- page: 可用性
- section: api.yml 参考
slug: api-yml
contents:
- page: 概览
- page: 环境
- page: 全局请求头
- page: 错误
- section: 集成
contents:
- page: 包
- page: 依赖其他 API
- page: 导出到 OpenAPI
slug: export-openapi
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
navigation:
- section: CLI 参考
contents:
- page: 开始使用 Fern CLI
slug: overview
- page: 全局选项
slug: options
- page: 命令
15 changes: 15 additions & 0 deletions fern/translations/zh/fern/products/dashboard/dashboard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
navigation:
- section: 入门
contents:
- page: 概览
- section: 配置
contents:
- page: 成员权限
slug: permissions
- page: 连接 GitHub 仓库
slug: github-repo
- page: 设置 SSO
slug: sso
- page: 密码保护
- page: 自定义域名
- page: PDF 导出
Loading
Loading