hugo-theme-relearn/static
Tom Cammann cb9cec76e3 Support yaml front matter in mermaid blocks
Mermaid diagrams can start with yaml front matter, e.g.
```
---
title: Example Diagram
---
graph LR
  A --> B
```

Relearn injects an init directive
`%%{init: {"theme":"default"}}%%` at the top of a mermaid block to
support theming the mermaid diagram. However this will cause a syntax
parser error in mermaid if the init directive comes before the yaml
front matter.

Valid:
```
%%{init: {"theme":"default"}}%%
graph LR
    A --> B
```
Invalid:
```
%%{init: {"theme":"default"}}%%
---
title: Example
---
graph LR
    A --> B
```

To support yaml front matter, we detect if front matter is used, and
inject the init directive after the front matter.

```
---
title: Example
---
%%{init: {"theme":"default"}}%%
graph LR
    A --> B
```
2023-06-09 11:52:23 +01:00
..
css tabs: fix issues with FF :has() selector #551 2023-06-06 20:29:02 +02:00
fonts theme: remove font Novacento #83 2021-11-03 19:52:55 +01:00
images theme: support for dark mode #175 2022-02-11 00:59:40 +01:00
js Support yaml front matter in mermaid blocks 2023-06-09 11:52:23 +01:00
webfonts theme: revert fontawsome to version 5 for IE11 compat #191 2022-02-23 12:40:16 +01:00