|
1 | | -# Flashduty Documentation |
| 1 | +# Flashduty 文档 |
2 | 2 |
|
3 | | -This repository contains the official documentation for [Flashduty](https://flashcat.cloud/), an incident management and on-call platform similar to PagerDuty. Built with [Mintlify](https://mintlify.com/). |
| 3 | +本仓库是 [Flashduty](https://flashcat.cloud/) 的官方文档,基于 [Mintlify](https://mintlify.com/) 构建。 |
4 | 4 |
|
5 | | -## Documentation Structure |
| 5 | +## 目录结构 |
6 | 6 |
|
7 | 7 | ``` |
8 | 8 | docs/ |
9 | | -├── zh/ # Chinese documentation |
10 | | -│ ├── home.mdx # Homepage |
11 | | -│ ├── on-call/ # On-call product docs |
12 | | -│ ├── rum/ # RUM product docs |
13 | | -│ ├── monitors/ # Monitors product docs |
14 | | -│ ├── platform/ # Platform configuration |
15 | | -│ ├── openapi/ # API documentation |
16 | | -│ └── ... |
17 | | -├── en/ # English documentation |
18 | | -│ └── (same structure as zh/) |
19 | | -├── logo/ # Logo assets |
20 | | -└── docs.json # Mintlify configuration |
| 9 | +├── zh/ # 中文文档 |
| 10 | +│ ├── home.mdx # 首页 |
| 11 | +│ ├── on-call/ # On-call 产品文档 |
| 12 | +│ ├── rum/ # RUM 产品文档 |
| 13 | +│ ├── monitors/ # Monitors 产品文档 |
| 14 | +│ ├── platform/ # 平台配置 |
| 15 | +│ ├── openapi/ # API 文档 |
| 16 | +│ ├── compliance/ # 安全合规 |
| 17 | +│ └── changelog/ # 更新日志 |
| 18 | +├── en/ # 英文文档(与 zh/ 结构一致) |
| 19 | +├── logo/ # Logo 资源 |
| 20 | +├── docs.json # Mintlify 配置文件 |
| 21 | +└── .cursor/rules/ # 写作规范 |
| 22 | + ├── rule.md # Mintlify 技术写作规范 |
| 23 | + └── term.md # 翻译术语表 |
21 | 24 | ``` |
22 | 25 |
|
23 | | -## Products |
| 26 | +## 产品模块 |
24 | 27 |
|
25 | | -- **On-call**: Incident management, alert routing, escalation rules, and on-call scheduling |
26 | | -- **RUM**: Real User Monitoring for frontend performance and error tracking |
27 | | -- **Monitors**: Alert rules configuration for various data sources |
| 28 | +- **On-call**:故障管理、告警路由、分派策略、值班管理 |
| 29 | +- **RUM**:真实用户监控,前端性能和异常追踪 |
| 30 | +- **Monitors**:多数据源告警规则配置 |
28 | 31 |
|
29 | | -## Development |
| 32 | +## 本地开发 |
30 | 33 |
|
31 | | -### Prerequisites |
| 34 | +### 环境准备 |
32 | 35 |
|
33 | | -Install the [Mintlify CLI](https://www.npmjs.com/package/mint): |
| 36 | +安装 [Mintlify CLI](https://www.npmjs.com/package/mint): |
34 | 37 |
|
35 | 38 | ```bash |
36 | 39 | npm i -g mint |
37 | 40 | ``` |
38 | 41 |
|
39 | | -### Local Preview |
| 42 | +### 本地预览 |
40 | 43 |
|
41 | | -Run the following command at the root of this repository: |
| 44 | +在仓库根目录运行: |
42 | 45 |
|
43 | 46 | ```bash |
44 | 47 | mint dev |
45 | 48 | ``` |
46 | 49 |
|
47 | | -View your local preview at `http://localhost:3000`. |
| 50 | +访问 `http://localhost:3000` 查看本地预览。 |
48 | 51 |
|
49 | | -### Check for Errors |
| 52 | +### 检查错误 |
50 | 53 |
|
51 | 54 | ```bash |
52 | 55 | mint broken-links |
53 | 56 | ``` |
54 | 57 |
|
55 | | -## Contributing |
| 58 | +## 新增文档 |
56 | 59 |
|
57 | | -1. All documentation supports both Chinese (`zh/`) and English (`en/`) languages |
58 | | -2. Follow the existing file structure and naming conventions |
59 | | -3. Use Mintlify components for consistent styling |
60 | | -4. Test changes locally before submitting |
| 60 | +### 1. 创建文档文件 |
61 | 61 |
|
62 | | -## Resources |
| 62 | +在对应目录下创建 `.mdx` 文件,文件必须以 YAML frontmatter 开头: |
63 | 63 |
|
64 | | -- [Flashduty Console](https://console.flashcat.cloud/) |
65 | | -- [Flashduty Website](https://flashcat.cloud/) |
66 | | -- [Mintlify Documentation](https://mintlify.com/docs) |
| 64 | +```yaml |
| 65 | +--- |
| 66 | +title: "清晰、具体的标题" |
| 67 | +description: "简洁说明页面目的和价值" |
| 68 | +keywords: ["关键词1", "关键词2", "关键词3"] |
| 69 | +--- |
| 70 | +``` |
| 71 | + |
| 72 | +### 2. 更新导航配置 |
| 73 | + |
| 74 | +在 `docs.json` 中添加新页面路径。找到对应的 `tab` 和 `group`,将文件路径添加到 `pages` 数组中: |
| 75 | + |
| 76 | +```json |
| 77 | +{ |
| 78 | + "group": "快速开始", |
| 79 | + "pages": [ |
| 80 | + "zh/on-call/quickstart/quickstart", |
| 81 | + "zh/on-call/quickstart/your-new-page" // 新增页面 |
| 82 | + ] |
| 83 | +} |
| 84 | +``` |
| 85 | + |
| 86 | +### 3. 使用规范优化文档 |
| 87 | + |
| 88 | +根据 `.cursor/rules/rule.md` 规范,使用 AI 进行文档优化,主要包括: |
| 89 | + |
| 90 | +#### 页面结构规范 |
| 91 | + |
| 92 | +- 以最重要的信息开头(倒金字塔结构) |
| 93 | +- 使用渐进式披露:基本概念在高级概念之前 |
| 94 | +- 将复杂程序分解为编号步骤 |
| 95 | +- 使用描述性、关键词丰富的标题 |
| 96 | + |
| 97 | +#### 常用组件 |
| 98 | + |
| 99 | +| 组件 | 用途 | |
| 100 | +|------|------| |
| 101 | +| `<Steps>` | 流程和顺序说明 | |
| 102 | +| `<Tabs>` | 平台特定内容或替代方法 | |
| 103 | +| `<CodeGroup>` | 多语言代码示例 | |
| 104 | +| `<Accordion>` | 可折叠的补充信息 | |
| 105 | +| `<Note>` / `<Tip>` / `<Warning>` | 标注提示信息 | |
| 106 | +| `<Frame>` | 图片容器 | |
| 107 | +| `<CardGroup>` | 相关链接卡片组 | |
| 108 | + |
| 109 | +#### 示例:分步说明 |
| 110 | + |
| 111 | +````mdx |
| 112 | +<Steps> |
| 113 | +<Step title="安装依赖"> |
| 114 | + 运行安装命令: |
| 115 | + ```bash |
| 116 | + npm install |
| 117 | + ``` |
| 118 | +</Step> |
| 119 | + |
| 120 | +<Step title="配置环境"> |
| 121 | + 创建配置文件并填写参数。 |
| 122 | +</Step> |
| 123 | +</Steps> |
| 124 | +```` |
| 125 | + |
| 126 | +#### 示例:多语言代码 |
| 127 | + |
| 128 | +````mdx |
| 129 | +<Tabs> |
| 130 | +<Tab title="Swift"> |
| 131 | +```swift |
| 132 | +let config = Config() |
| 133 | +``` |
| 134 | +</Tab> |
| 135 | + |
| 136 | +<Tab title="Objective-C"> |
| 137 | +```objc |
| 138 | +Config *config = [[Config alloc] init]; |
| 139 | +``` |
| 140 | +</Tab> |
| 141 | +</Tabs> |
| 142 | +```` |
| 143 | + |
| 144 | +### 4. 多语言同步 |
| 145 | + |
| 146 | +- 中英文文档需保持结构一致 |
| 147 | +- 翻译时参考 `.cursor/rules/term.md` 术语表 |
| 148 | +- 英文文档放在 `en/` 目录,路径与 `zh/` 对应 |
| 149 | + |
| 150 | +## 写作规范速查 |
| 151 | + |
| 152 | +### 语言风格 |
| 153 | + |
| 154 | +- 使用清晰、直接的语言 |
| 155 | +- 在说明中使用第二人称("您") |
| 156 | +- 使用主动语态 |
| 157 | +- 避免术语,必要时首次使用时定义 |
| 158 | + |
| 159 | +### 代码示例要求 |
| 160 | + |
| 161 | +- 提供完整、可运行的示例 |
| 162 | +- 指定语言并包含文件名 |
| 163 | +- 为复杂逻辑添加注释 |
| 164 | +- 永远不要包含真实的 API 密钥 |
| 165 | + |
| 166 | + |
| 167 | +## 相关资源 |
| 168 | + |
| 169 | +- [Flashduty 控制台](https://console.flashcat.cloud/) |
| 170 | +- [Flashduty 官网](https://flashcat.cloud/) |
| 171 | +- [Mintlify 文档](https://mintlify.com/docs) |
0 commit comments