> 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/ja-gitbook-documentation/kontentsuwosuru/blocks/mermaid-blocks.md).

# Mermaid ブロック

Mermaid 構文を使って GitBook で図を作成するために、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>

### トラブルシューティング

Mermaid図がレンダリングされない場合は、次のよくある原因を確認してください。

* **構文エラー** — Mermaidコードに誤字がないか確認し、Mermaidドキュメントの例と照らし合わせるか、 [Mermaid Live Editor](https://mermaid.live/) で問題を切り分けます。
* **Mermaidブロックではなくコードブロックを使用している** — Mermaidコードは標準のコードブロック内ではレンダリングされません。 `/` を押して、 **Mermaid図** を選択し、正しい種類のブロックを挿入します。
* **古いMermaidコンテンツ** — Mermaidはネイティブブロックのため、インテグレーションは必要ありません。ネイティブブロックに対応する前に作成したMermaidコンテンツは、ページを次回編集するときにGitBookが自動的に変換します。


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/documentation/ja-gitbook-documentation/kontentsuwosuru/blocks/mermaid-blocks.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
