mermaid: lazy render graph if it is initially hidden

works now in initially collapsed expands and initially inactive tabs
This commit is contained in:
Sören Weber 2023-08-26 01:26:37 +02:00
commit 0dd4b34023
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
2 changed files with 24 additions and 9 deletions
exampleSite/content/shortcodes

View file

@ -15,10 +15,6 @@ graph LR;
This only works in modern browsers.
{{% /notice %}}
{{% notice warning %}}
Due to limitations with [Mermaid](https://github.com/mermaid-js/mermaid/issues/1846), it is currently not possible to use Mermaid code fences in an initially collapsed `expand` shortcode. This is a know issue and [can't be fixed by this theme](https://github.com/McShelby/hugo-theme-relearn/issues/187).
{{% /notice %}}
## Usage
While the examples are using shortcodes with named parameter it is recommended to use codefences instead. This is because more and more other software supports Mermaid codefences (eg. GitHub) and so your markdown becomes more portable.