hugo-theme-relearn/static/js
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
..
d3 mermaid: remove jQuery #452 2023-02-04 01:54:13 +01:00
lunr search: apply dependency scripts for Hindi and Japanese #427 2022-12-30 01:09:07 +01:00
mathjax math: add mathjax rendering #235 2022-07-02 14:00:23 +02:00
swagger-ui openapi: replace implementation with swagger-ui #523 2023-05-14 23:05:07 +02:00
auto-complete.js search: fix oddities in keyboard handling #463 2023-02-03 22:08:06 +01:00
clipboard.min.js theme: remove typos and superflous whitespace 2021-08-23 23:51:52 +02:00
mermaid.min.js chore: update Mermaid to 10.2.0 #499 2023-05-24 20:25:13 +02:00
perfect-scrollbar.min.js variant: set color for perfect scrollbar #471 2023-02-10 17:03:18 +01:00
search.js nav: fix initial positioning on content pages #476 2023-02-12 14:10:55 +01:00
theme.js Support yaml front matter in mermaid blocks 2023-06-09 11:52:23 +01:00
url.js #search: IE11 compatibility #386 2022-11-18 09:02:39 +01:00
variant.js openapi: replace implementation with swagger-ui #523 2023-05-14 23:05:07 +02:00