> 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/fr/creer-du-contenu/blocks/mermaid-blocks.md).

# Blocs Mermaid

Ajoutez un bloc Mermaid pour créer des diagrammes dans GitBook à l’aide de la syntaxe Mermaid

Les blocs Mermaid vous permettent de créer des diagrammes à l’aide de la [Mermaid](https://mermaid.ai/) syntaxe.

Utilisez-les lorsque vous voulez afficher des flux, des séquences, des états ou des relations dans un format facile à mettre à jour.

### Ajouter un bloc Mermaid

1. Placez le curseur sur une ligne vide et tapez `/`.
2. Cliquez **Mermaid** dans le menu d’insertion.
3. Saisissez ou collez votre syntaxe Mermaid. GitBook rend le diagramme automatiquement.

Vous pouvez aussi cliquer sur le **+** à gauche de n’importe quelle ligne dans l’éditeur, puis cliquer sur **Mermaid**.

### Exemple

```mermaid
flowchart TD
    A[Ouvrez la palette d’insertion] --> B[Sélectionnez Mermaid]
    B --> C[Ajoutez la syntaxe Mermaid]
    C --> D[GitBook rend le diagramme]
```

### Représentation en Markdown

````markdown
```mermaid
flowchart TD
    A[Ouvrez la palette d’insertion] --> B[Sélectionnez Mermaid]
    B --> C[Ajoutez la syntaxe Mermaid]
    C --> D[GitBook rend le diagramme]
```
````

GitBook rend les blocs de code avec le `mermaid` identifiant de langue comme des blocs Mermaid natifs.<br>

### Dépannage

Si votre diagramme Mermaid ne s’affiche pas, vérifiez ces causes courantes :

* **Erreurs de syntaxe** — relisez votre code Mermaid pour y déceler des fautes de frappe, comparez-le avec des exemples dans la documentation Mermaid, ou testez-le dans le [Mermaid Live Editor](https://mermaid.live/) pour isoler le problème.
* **Bloc de code au lieu d’un bloc Mermaid** — le code Mermaid ne s’affichera pas dans un bloc de code standard. Appuyez sur `/` et sélectionnez **diagramme Mermaid** pour insérer le bon type de bloc.
* **Contenu Mermaid ancien** — Mermaid est un bloc natif, donc aucune intégration n’est nécessaire. Si vous avez créé du contenu Mermaid avant la prise en charge des blocs natifs, GitBook le convertit automatiquement la prochaine fois que vous modifiez la page.


---

# 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/fr/creer-du-contenu/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.
