Skip to main content

Templates and Examples

Catalogue template (inclusive) _category_.json)​

When you add a new document to a table of contents and you want it to have a clear classification name/order/index page in the automatic sidebar, it is suggested to organize it by the template below.

Example of directory structure:

docs/
develop/
message/
_category_.json
消息收发说明.md
消息格式说明.md
assets/
diagram.png

_category_.json Example:

{
"label": "内核自定义",
"position": 3,
"link": {
"type": "generated-index",
"description": "这里填写该目录内容概述(用于索引页展示与检索)"
}
}

0.2 Specifies the index document (classify heading to intro.md)​

Example of directory structure:

docs/
develop/
message/
_category_.json
intro.md
xxx.md
assets/
xxx.png

_category_.json Example:

{
"label": "消息",
"position": 1,
"link": {
"type": "doc",
"id": "develop/message/intro"
}
}

After copying, delete as required:

---
sidebar_position: 10
title: 这里填写页面标题
---

# 这里填写页面标题

## 快速开始

1. 第一步
2. 第二步
3. 第三步

## 详细说明

### 关键概念

- 概念 A: 一句话解释
- 概念 B: 一句话解释

### 配置/参数

```json
{
"example": true
}

常见问题​

Q1: XXX 失败怎么办?​

  • 现象:
  • 原因:
  • 解决:

参考​

  • 外部链接:
  • 相关文档:

## 2. Operating step templates (including screenshots)

```md
## 操作步骤

1. 打开 **工作台** → **工程**

![工作台工程入口=640x](./workbench-entry.png)

2. 点击 **新建工程**, 填写工程信息

![新建工程对话框=640x](./create-project.png)

:::tip[小提示]
如果选项较多, 建议说明"推荐默认值"和"何时需要改".
:::

2.1 Example of formula (KaTeX)​

行内公式: $E=mc^2$

块级公式:

$$
\Delta p = \lambda \frac{L}{D}\frac{\rho v^2}{2}
$$

2.2 Example of flowchart (Mermaid)​

Simple process​

```mermaid
graph LR
A [start] --> B [processing data]
B -- > C {Check results}
C-l-l-l-l-l-l-l-l-l-l-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I...
C-l-l-l-l-l-l-l-l-l-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I...
E --> B
D-> F [concluded]
```

Rendering effect:

System Architecture​

```mermaid
graph TB
Subgraph Front Layer
A [User interface]
B [Workbench]
end
Subgraph Service Level
C[API gateway]
D [Operational services]
end
Subgraph Data Layer
E [database]
F [Document Storage]
end
A --> C
B --> C
C --> D
D --> E
D --> F
```

Rendering effect:

Example of time chart​

```mermaid
sequenceDiagram
Party U as user
Party F as Frontend
Party B as Backend
Party D as Database

U->F: Subtask form
F->F: Verify Data
F->B: Send Request
B->D: Query data
D-- > B: Return results
B->B: Processing business logic
B--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Response
F-->U: Show results
```

Rendering effect:

Use recommendations
  • Flowchart suitable for business processes, operation steps
  • Time chart suitable for display of system interaction, interface calls
  • The status map is suitable for displays, life cycles.
  • Mermaid charts are easier to maintain and update than static screenshots

3. Profile description template​

3.1 Parameter Table Reference​

Component documents can directly refer to component definition to generate icons and argument tables:

<ComponentIcon workspace="lps_online" classID="Pipe" />

ComponentIcon Calculates the SVG for component default parameters condition properties, and hide condition is the element of false; also, the port element is hidden by default to show the effect is consistent with the WorkBench component list.

If you need to show a condition state, you can upload the overlay parameters:

<ComponentIcon workspace="lps_online" classID="BlockValve" params={{ InitialStatus: 1 }} />
<ComponentParamsTable workspace="lps_online" classID="Pipe" />

ComponentParamsTable Automatically generate containing parameter names,key, type, description table.

of which lps_online It's the type of workspace.Pipe is a component classID.

## 配置项

| 字段 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| `enabled` | boolean | `false` | 是否启用功能 |
| `timeoutMs` | number | `30000` | 超时时间(毫秒) |

### 示例

```json
{
"enabled": true,
"timeoutMs": 10000
}

## 4. Templates for exclusion

```md
## 排障

### 现象

- 描述用户看到的错误/日志/界面提示

### 常见原因

1. 原因 1
2. 原因 2

### 解决步骤

1. 步骤 1(给命令, 路径或截图)
2. 步骤 2

### 仍未解决

- 收集信息: 版本号, 日志, 复现步骤
- 联系方式: