update mermaid docs #5

This commit is contained in:
Sören Weber 2021-07-02 22:05:35 +02:00
parent 6b7779dac5
commit 2219b54ebe
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589

View file

@ -187,24 +187,22 @@ stateDiagram-v2
## Configuration
By default, mermaid is configured with default settings. You can customize mermaids default settings for all of your files thru a JSON object in your `config.toml` or override these settings sidewise thru your pages frontmatter.
Mermaid is configured with default settings. You can customize mermaids default settings for all of your files thru a JSON object in your `config.toml` or override these settings sidewise thru your pages frontmatter.
This JSON object is forwarded into mermaids `mermaid.initialize()` function.
See [mermaid documentation](http://mermaid-js.github.io/mermaid/getting-started/Setup.html#mermaidapi-configuration-defaults) for all allowed settings.
### Allow HTML in graphs
By default newer versions of mermaid disallow HTML in graphs if you are using default settings. To enable this, set the following line in your `config.toml`
### Example
````toml
[params]
mermaidInitialize = "{ \"securityLevel\": \"loose\", \"startOnLoad\": true }"
mermaidInitialize = "{ \"theme\": \"dark\" }"
````
or pages frontmatter
````toml
+++
mermaidInitialize = "{ \"securityLevel\": \"loose\", \"startOnLoad\": true }"
mermaidInitialize = "{ \"theme\": \"dark\" }"
+++
````