i18n: Add some zh-cn translation of exampleSite(docs) (#12)

---------

Co-authored-by: Xin <xin@imfing.com>
This commit is contained in:
纳兰音韵
2023-08-31 04:21:31 +08:00
committed by GitHub
parent 392c6f8dde
commit e1a2109a68
16 changed files with 859 additions and 0 deletions

View File

@ -0,0 +1,53 @@
---
title: Diagrams
weight: 6
next: /docs/guide/shortcodes
---
目前, Hextra 支持 [Mermain](#mermaid) 的图表.
<!--more-->
## Mermaid
[Mermaid](https://github.com/mermaid-js/mermaid#readme) 是一个基于 JavaScript 的图表绘制工具, 它的文本定义和 Markdown 类似, 可在浏览器中动态创建图表. 例如, 流程图、序列图、饼图等
在 Hextra 中使用 Mermain 就像使用代码块一样简单:
````markdown
```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```
````
将呈现为:
```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```
Sequence diagram:
```mermaid
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
```
如需获取更多信息, 转至 [Mermaid Documentation](https://mermaid-js.github.io/mermaid/#/).