Skip to content

Commit

Permalink
Upgrade mermaid to 8.0.0 (18 Dec 2018)
Browse files Browse the repository at this point in the history
* Updated mermaid 8.0.0 (18 Dec 2018)
* Added more complicated mermaid example to the Getting Started sample site
* Updated mermaid to include also PR that adds support for multiple linkStyle in a single line

Resolves #179
  • Loading branch information
ivan-danilov authored and Pilskalns committed Feb 22, 2019
1 parent 276363e commit 1d12f57
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 30 deletions.
56 changes: 56 additions & 0 deletions exampleSite/content/shortcodes/mermaid.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,62 @@ graph LR;
C -->|Two| E[Result two]
{{< /mermaid >}}

### With sub-graphs and some style

{{%expand "Show code..."%}}
{{</*mermaid align="left"*/>}}
graph LR;
X --> Y
linkStyle 0 stroke:#f00,stroke-width:4px;
Y --> Z
Z --> X
linkStyle 1,2 interpolate basis stroke:#0f0,stroke-width:2px;
X --> A1
subgraph right
A2 --> B2
B2 --> C2
end
subgraph left
A1 --> B1
B1 --> C1
end
C1 --> X
Z --> A2
C2 --> Z

style Y fill:#f9f,stroke:#333,stroke-width:4px

classDef left fill:#ccf,stroke:#f66,stroke-width:2px,stroke-dasharray: 5, 5
class A1,B1,C1 left
{{</* /mermaid */>}}
{{%/expand%}}

{{<mermaid align="left">}}
graph LR;
X --> Y
linkStyle 0 stroke:#f00,stroke-width:4px;
Y --> Z
Z --> X
linkStyle 1,2 interpolate basis stroke:#0f0,stroke-width:2px;
X --> A1
subgraph right
A2 --> B2
B2 --> C2
end
subgraph left
A1 --> B1
B1 --> C1
end
C1 --> X
Z --> A2
C2 --> Z

style Y fill:#f9f,stroke:#333,stroke-width:4px

classDef left fill:#ccf,stroke:#f66,stroke-width:2px,stroke-dasharray: 5, 5
class A1,B1,C1 left
{{</mermaid>}}

## Sequence example
{{%expand "Show code ..."%}}
{{</*mermaid*/>}}
Expand Down
Loading

0 comments on commit 1d12f57

Please sign in to comment.