mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
Merge branch 'deining-contrib'
This commit is contained in:
commit
af9421f899
2 changed files with 6 additions and 5 deletions
|
@ -5,7 +5,7 @@ title = "Mermaid"
|
|||
|
||||
The `mermaid` shortcode generates diagrams and flowcharts from text, in a similar manner as Markdown using the [Mermaid](https://mermaidjs.github.io/) library.
|
||||
|
||||
{{< mermaid >}}
|
||||
{{< mermaid align="center" >}}
|
||||
graph LR;
|
||||
If --> Then
|
||||
Then --> Else
|
||||
|
@ -33,7 +33,7 @@ To use codefence syntax you have to turn off `guessSyntax` for the `markup.highl
|
|||
{{% tab name="codefence" %}}
|
||||
|
||||
````md
|
||||
```mermaid
|
||||
```mermaid { align="center" }
|
||||
graph LR;
|
||||
If --> Then
|
||||
Then --> Else
|
||||
|
@ -44,7 +44,7 @@ graph LR;
|
|||
{{% tab name="shortcode" %}}
|
||||
|
||||
````go
|
||||
{{</* mermaid */>}}
|
||||
{{</* mermaid align="center" */>}}
|
||||
graph LR;
|
||||
If --> Then
|
||||
Then --> Else
|
||||
|
@ -58,6 +58,7 @@ graph LR;
|
|||
{{ partial "shortcodes/mermaid.html" (dict
|
||||
"context" .
|
||||
"content" "graph LR;\nIf --> Then\nThen --> Else"
|
||||
"align" "center"
|
||||
)}}
|
||||
|
||||
````
|
||||
|
@ -69,8 +70,6 @@ The generated graphs can be be panned by dragging them and zoomed by using the m
|
|||
|
||||
### Parameter
|
||||
|
||||
Parameter are only supported when using shortcode or partial syntax. Defaults are used when using codefence syntax.
|
||||
|
||||
| Name | Default | Notes |
|
||||
|:----------------------|:-----------------|:------------|
|
||||
| **align** | `center` | Allowed values are `left`, `center` or `right`. |
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{{ .Attributes }}
|
||||
{{- partial "shortcodes/mermaid.html" (dict
|
||||
"context" .
|
||||
"content" .Inner
|
||||
"align" (index .Attributes "align")
|
||||
) }}
|
Loading…
Reference in a new issue