> 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.
