mermaid流程图工具_Markdown Mermaid 流程图

本文档提供了MarkdownMermaid流程图语法的详细介绍,包括序列图、流程图、状态图等,并介绍了如何在GitHub、Hexo-Next-Theme中启用Mermaid支持。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Markdown Mermaid 流程图语法笔记,以及 GitHub、Hexo-Next-Theme 和相关编辑器的支持

一切从简,少用图,多用流程图

Markdown语法

Mermaid 语法

代码块选择 mermaid 语言

sequenceDiagram

sequenceDiagram

Alice->>John: Hello John, how are you?

John-->>Alice: Great!

sequenceDiagram

Alice->>John: Hello John, how are you?

activate John

John-->>Alice: Great!

deactivate John

%% Example of sequence diagram

sequenceDiagram

Alice->>Bob: Hello Bob, how are you?

alt is sick

Bob->>Alice: Not so good :(

else is well

Bob->>Alice: Feeling fresh like a daisy

end

opt Extra response

Bob->>Alice: Thanks for asking

end

Flowchart

graph LR

a --> b & c--> d

graph LR

A[Hard edge] -->B(Round edge)

B --> C{Decision}

C -->|One| D[Result one]

C -->|Two| E[Result two]

graph TB

A & B--> C & D

graph TB

c1-->a2

subgraph one

a1-->a2

end

subgraph two

b1-->b2

end

subgraph three

c1-->c2

end

State Diagram

stateDiagram-v2

State1: The state with a note

note right of State1

Important information! You can write

notes.

end note

State1 --> State2

note left of State2 : This is the note to the left.

Entity Relationship Diagram

erDiagram

CUSTOMER ||--o{ ORDER : places

ORDER ||--|{ LINE-ITEM : contains

CUSTOMER }|..|{ DELIVERY-ADDRESS : uses

User Journey

journey

title My working day

section Go to work

Make tea: 5: Me

Go upstairs: 3: Me

Do work: 1: Me, Cat

section Go home

Go downstairs: 5: Me

Sit down: 5: Me

Pie Charts

pie

title Pie Chart

"Dogs" : 386

"Cats" : 85

"Rats" : 150

相关支持

Editors

GitHub

Hexo

Next 主题 (最新版本)直接在 next/_config.yml 中 808 行左右修改 enable: true

# Mermaid tag

mermaid:

enable: true # Default false

# Available themes: default | dark | forest | neutral

theme: forest

安装依赖库

npm install hexo-filter-mermaid-diagrams -s

本文地址:https://blog.csdn.net/qq_36962569/article/details/108171310

希望与广大网友互动??

点此进行留言吧!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值