-
Notifications
You must be signed in to change notification settings - Fork 914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mermaid Update #427
Merged
Merged
Mermaid Update #427
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
43adc57
Update mermaid to v10.8.0
sylhare 555db0c
Update mermaid examples
sylhare 9c8cb20
Update mermaid render
sylhare f18fc4b
Update scss for markdown mermaid
sylhare 6fc9737
Update documentation
sylhare b40446b
Update theme documentation
sylhare File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
<footer class="site-footer"> | ||
<p class="text"> | ||
{{ site.footer_text | default: "Powered by <a href='https://jekyllrb.com/'>Jekyll</a> with <a href='https://github.com/sylhare/Type-on-Strap'>Type on Strap</a>" }}</p> | ||
<div class="footer-icons"> | ||
<ul> | ||
<!-- Social icons from Font Awesome, if enabled --> | ||
{% include social/icons.liquid %} | ||
</ul> | ||
</div> | ||
<div class="footer-icons"> | ||
<ul> | ||
<!-- Social icons from Font Awesome, if enabled --> | ||
{% include social/icons.liquid %} | ||
</ul> | ||
</div> | ||
{% if site.mermaid %} | ||
<script type="module"> | ||
mermaid.initialize({ startOnLoad: false, theme: "default" }); | ||
mermaid.run({ nodes: [...document.querySelectorAll('.language-mermaid'), ...document.querySelectorAll('.mermaid')] }); | ||
</script> | ||
{% endif %} | ||
</footer> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,17 @@ sequenceDiagram | |
</div> | ||
``` | ||
|
||
> 💡 Now render also work with the GitHub markdown highlight. | ||
{% highlight markdown %} | ||
```mermaid | ||
sequenceDiagram | ||
Alice->>John: Hello John, how are you? | ||
John-->>Alice: Great! | ||
``` | ||
{% endhighlight %} | ||
That will be rendered into this: | ||
|
||
{% include aligner.html images="mermaid-example.png" column=1 %} | ||
{% include aligner.html images="mermaid-example.png" column=auto %} | ||
|
||
You can also go with more complex features and diagrams from the [documentation](https://mermaid-js.github.io/mermaid/), | ||
and try it out with the [live editor](https://mermaid.live/). | ||
|
@@ -43,18 +51,20 @@ sequenceDiagram | |
|
||
### Flow | ||
|
||
<div class="mermaid"> | ||
```mermaid | ||
flowchart TD | ||
A[Christmas] -->|Get money| B(Go shopping) | ||
B --> C{Let me think} | ||
C -->|One| D[Laptop] | ||
D ~~~ E | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. new in 10.8.0 to align blocks |
||
C -->|Two| E[iPhone] | ||
C -->|Three| F[fa:fa-car Car] | ||
</div> | ||
%% Grinch | ||
``` | ||
|
||
### Class | ||
|
||
<div class="mermaid"> | ||
```mermaid | ||
classDiagram | ||
Animal <|-- Duck | ||
Animal <|-- Fish | ||
|
@@ -76,23 +86,23 @@ classDiagram | |
+bool is_wild | ||
+run() | ||
} | ||
</div> | ||
``` | ||
|
||
### State | ||
|
||
<div class="mermaid"> | ||
```mermaid | ||
stateDiagram-v2 | ||
[*] --> Still | ||
Still --> [*] | ||
Still --> Moving | ||
Moving --> Still | ||
Moving --> Crash | ||
Crash --> [*] | ||
</div> | ||
``` | ||
|
||
### ER | ||
|
||
<div class="mermaid"> | ||
```mermaid | ||
erDiagram | ||
CUSTOMER }|..|{ DELIVERY-ADDRESS : has | ||
CUSTOMER ||--o{ ORDER : places | ||
|
@@ -102,11 +112,11 @@ erDiagram | |
ORDER ||--|{ ORDER-ITEM : includes | ||
PRODUCT-CATEGORY ||--|{ PRODUCT : contains | ||
PRODUCT ||--o{ ORDER-ITEM : "ordered in" | ||
</div> | ||
``` | ||
|
||
### Gantt | ||
|
||
<div class="mermaid"> | ||
```mermaid | ||
gantt | ||
title A Gantt Diagram | ||
dateFormat YYYY-MM-DD | ||
|
@@ -116,11 +126,11 @@ gantt | |
section Another | ||
Task in sec :2014-01-12 , 12d | ||
another task : 24d | ||
</div> | ||
``` | ||
|
||
### User Journey | ||
|
||
<div class="mermaid"> | ||
```mermaid | ||
journey | ||
title My working day | ||
section Go to work | ||
|
@@ -130,11 +140,11 @@ journey | |
section Go home | ||
Go downstairs: 5: Me | ||
Sit down: 3: Me | ||
</div> | ||
``` | ||
|
||
### Git | ||
|
||
<div class="mermaid"> | ||
```mermaid | ||
gitGraph | ||
commit | ||
commit | ||
|
@@ -146,20 +156,20 @@ gitGraph | |
merge develop | ||
commit | ||
commit | ||
</div> | ||
``` | ||
|
||
### Pie | ||
|
||
<div class="mermaid"> | ||
```mermaid | ||
pie title Pets adopted by volunteers | ||
"Dogs" : 386 | ||
"Cats" : 85 | ||
"Rats" : 15 | ||
</div> | ||
``` | ||
|
||
### Mindmap | ||
|
||
<div class="mermaid"> | ||
```mermaid | ||
mindmap | ||
root((mindmap)) | ||
Origins | ||
|
@@ -177,11 +187,11 @@ mindmap | |
Tools | ||
Pen and paper | ||
Mermaid | ||
</div> | ||
``` | ||
|
||
### QuadrantChart | ||
|
||
<div class="mermaid"> | ||
```mermaid | ||
quadrantChart | ||
title Reach and engagement of campaigns | ||
x-axis Low Reach --> High Reach | ||
|
@@ -196,16 +206,16 @@ quadrantChart | |
Campaign D: [0.78, 0.34] | ||
Campaign E: [0.40, 0.34] | ||
Campaign F: [0.35, 0.78] | ||
</div> | ||
``` | ||
|
||
### XYChart | ||
|
||
<div class="mermaid"> | ||
```mermaid | ||
xychart-beta | ||
title "Sales Revenue" | ||
x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec] | ||
y-axis "Revenue (in $)" 4000 --> 11000 | ||
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000] | ||
line [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000] | ||
</div> | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div class="mermaid">
is still supported, but I prefer the more markdown integrated way.