> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/zh/creating-content/blocks/mermaid-blocks.md).

# Mermaid 块

Mermaid 区块可让你使用 [Mermaid](https://mermaid.ai/) 语法创建图表。

当你想以便于更新的格式展示流程、顺序、状态或关系时，可以使用它们。

### 添加 Mermaid 区块

1. 将光标放在空白行上并输入 `/`.
2. 点击 **Mermaid** 插入菜单中的。
3. 输入或粘贴你的 Mermaid 语法。GitBook 会自动渲染该图表。

你也可以点击 **+** 编辑器中任意一行左侧的 **Mermaid**.

### 示例

```mermaid
flowchart TD
    A[打开插入面板] --> B[选择 Mermaid]
    B --> C[添加 Mermaid 语法]
    C --> D[GitBook 渲染图表]
```

### Markdown 中的表示方式

````markdown
```mermaid
flowchart TD
    A[打开插入面板] --> B[选择 Mermaid]
    B --> C[添加 Mermaid 语法]
    C --> D[GitBook 渲染图表]
```
````

GitBook 会将带有 `mermaid` 语言标识符的代码块渲染为原生 Mermaid 区块。<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gitbook.com/docs/documentation/zh/creating-content/blocks/mermaid-blocks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
