- 复制与你的内容类型匹配的模板。
- 将占位符和示例内容替换为你的实际内容。
- 按需调整各个部分。
- 删除任何不适用的部分。
不确定该使用哪个模板?阅读 内容类型 以了解每种模板适用的场景。
操作指南模板
How-to guide template
Copy
---
title: "[标题应以动词开头]"
description: "[执行特定任务]以[达成结果]。"
---
以简短的陈述开始,说明本指南帮助用户完成什么任务。
## 前置条件(可选)
仅列出必要的内容:
- 必需的设置或配置
- 所需的权限
- 应首先配置的相关功能
## [描述任务的行动导向标题]
提供专注于实现目标的直接说明。
1. 打开[位置]并导航到[特定位置]
2. 点击[按钮或选项]
3. 输入[必填信息]
4. 点击[确认按钮]
```language
// Include code examples that users can copy and modify
```
<Tip>
Include practical tips that help users avoid common mistakes or work more efficiently.
</Tip>
## Verify the result (optional)
If success is ambiguous, explain how users can confirm they completed the task successfully.
## Troubleshooting (optional)
Address common issues users might encounter:
- **Problem description**: Solution or workaround
- **Another common issue**: How to resolve it
## Related tasks
Link to related how-to guides or next steps.
教程模板
Tutorial template
Copy
---
title: "[Action verb] [specific outcome]"
description: "Learn how to [specific outcome] by [method or approach]."
---
Use an introduction paragraph to explain what users will learn and what they'll be able to do after completing this tutorial.
## Prerequisites
List what users need before starting:
- Required knowledge or skills
- Tools, accounts, or permissions
- Time commitment (optional)
## Step 1: [First action]
Provide clear, specific instructions for the first step.
```language
// Include code examples where helpful
```
Explain what this step accomplishes and why it matters.
## Step 2: [Second action]
Continue with sequential steps that build on previous work.
Point out milestones and progress markers so users know they're on track.
## Step 3: [Third action]
Keep steps focused on concrete actions rather than theory.
Minimize choices that users need to make.
## 后续步骤
总结用户学到的内容并建议合理的后续步骤:
- 可尝试的相关教程
- 常见任务的操作指南
- 用于深入学习的其他资源
说明模板
Explanation template
Copy
---
title: "关于 [概念或功能]"
description: "了解 [概念] 及其在 [产品或上下文] 中的工作原理。"
---
首先明确说明本文档涵盖的内容以及理解它的重要性。
用通俗易懂的语言定义概念。解释它是什么、有什么作用以及为什么存在。
必要时使用类比或与熟悉概念的对比来帮助理解。
## [概念] 的工作原理
解释底层机制、架构或流程。
<Frame>
<img src="/path/to/diagram.png" alt="显示 [概念] 工作原理的图表" />
</Frame>
将复杂的概念分解为易于理解的部分。
## 为什么采用 [设计决策或方法]
提供关于事物为何以这种方式工作的背景信息。
讨论权衡取舍、考虑过的替代方案或影响设计的约束条件。
## 何时使用 [概念]
帮助用户了解何时最适合使用此概念或方法。
- **用例 1**:适合使用此方法的场景
- **用例 2**:另一个适合选择此方法的场景
- **不推荐用于**:替代方案更优的情况
## 与其他功能的关系
建立与产品中相关概念或功能的联系。
解释此概念如何融入更广泛的系统或工作流程。
## 常见误解
澄清误解或阐明细微差别。
## 延伸阅读
链接到相关说明、教程或参考文档。
参考模板
Reference template
Copy
---
title: "[Feature or API name] reference"
description: "Complete reference for [feature or API] properties, parameters, and options."
---
Provide a one-sentence description of what this feature or API does.
## Properties
<ParamField body="property1" type="string" required>
Brief description of the property.
</ParamField>
<ParamField body="property2" type="number">
Brief description with default value if applicable.
</ParamField>
<ParamField body="property3" type="boolean" default="false">
Brief description.
</ParamField>
## Parameters
<ParamField body="parameterName" type="string">
Description of what this parameter does and when to use it.
```language
// Example showing typical usage
```
</ParamField>
<ParamField body="anotherParameter" type="object">
参数的说明。
可用选项:
- `option1`: 此选项的说明。
- `option2`: 此选项的说明。
</ParamField>
## Examples
### Basic example
```language title="Basic usage"
// Minimal example showing common use case
```
### Advanced example
```language title="Advanced configuration"
// Example with multiple options configured
```
## Response
If documenting an API, describe the response structure.
<ResponseField name="field1" type="string" required>
Description of the response field.
</ResponseField>
<ResponseField name="field2" type="number">
Description of another response field.
</ResponseField>
Example response:
```json
{
"field1": "value",
"field2": 123
}
```
## Related references
Link to related reference documentation.