You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md
+33-42
Original file line number
Diff line number
Diff line change
@@ -342,58 +342,49 @@ With Mermaid support enabled in Docsy, you can include the text definition of a
342
342
343
343
The great advantage of this is anyone who can edit the page can now edit the diagram - no more hunting for the original tools and version to make a new edit.
344
344
345
-
For example, the following defines a simple flowchart:
345
+
For example, the following defines a sequence diagram:
346
346
347
347
````
348
348
```mermaid
349
-
graph TD
350
-
Start --> Need{"Hugo version >= 0.93.0"}
351
-
Need -- No --> Off["Set params.mermaid.enable = true"]
Docsy user->>Discussion board: Mark question as resolved
379
+
Docsy user->>Docsy user: Being happy
365
380
```
366
381
367
-
With hugo version 0.93 or higher, support of Mermaid diagrams is automatically enabled as soon as you use a `mermaid` code block on your page.
382
+
Support of Mermaid diagrams is automatically enabled as soon as you use a `mermaid` code block on your page.
368
383
369
-
In case of hugo version 0.92 or lower you have to enable mermaid manually inside your `hugo.toml`/`hugo.yaml`/`hugo.json`:
370
-
371
-
{{< tabpane >}}
372
-
{{< tab header="Hugo version <= 0.92 only:" disabled=true />}}
373
-
{{< tab header="hugo.toml" lang="toml" >}}
374
-
[params.mermaid]
375
-
enable = true
376
-
{{< /tab >}}
377
-
{{< tab header="hugo.yaml" lang="yaml" >}}
378
-
params:
379
-
mermaid:
380
-
enable: true
381
-
{{< /tab >}}
382
-
{{< tab header="hugo.json" lang="json" >}}
383
-
{
384
-
"params": {
385
-
"mermaid": {
386
-
"enable": true
387
-
}
388
-
}
389
-
}
390
-
{{< /tab >}}
391
-
{{< /tabpane >}}
392
-
393
-
By default, docsy pulls in the latest officially released version of Mermaid at build time. If that doesn't fit your needs, you can specify the wanted mermaid version inside your `hugo.toml`:
384
+
By default, docsy pulls in the latest officially released version of Mermaid at build time. If that doesn't fit your needs, you can specify the wanted mermaid version inside your configuration file `hugo.toml`/`hugo.yaml`/`hugo.json`:
394
385
395
386
{{< tabpane persistLang=false >}}
396
-
{{< tab header="Hugo version >= 0.90 only:" disabled=true />}}
See the [Mermaid documentation](https://mermaid-js.github.io/mermaid/#/Setup?id=mermaidapi-configuration-defaults) for a list of defaults that can be overridden.
440
+
See the [Mermaid source code](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/defaultConfig.ts#L18) for a list of defaults that can be overridden.
450
441
451
-
Settings can also be overridden on a per-diagram basis by making use of the `%%init%%` header at the start of the diagram definition. See the [Mermaid theming documentation](https://mermaid-js.github.io/mermaid/#/theming?id=themes-at-the-local-or-current-level).
442
+
Settings can also be overridden on a per-diagram basis by making use of a [frontmatter config](http://mermaid.js.org/config/theming.html#customizing-themes-with-themevariables) block at the start of the diagram definition.
0 commit comments