fix script loading

This commit is contained in:
Robert Kaussow 2020-06-01 16:04:18 +02:00
parent 178b92b0a0
commit 048f98fd22
2 changed files with 8 additions and 6 deletions

View File

@ -37,7 +37,7 @@ steps:
commands:
- vnu --skip-non-html --also-check-css --errors-only exampleSite/public
- name: dead-links-validation
- name: link-validation
image: xoxys/link-validator
commands:
- link-validator -ro
@ -168,6 +168,6 @@ depends_on:
---
kind: signature
hmac: 6c9fc660b81ed9086e1bcb0f8176ba6b084834bc7ecafbaa0573943760698330
hmac: 6d920a9019c2478a391c98d207313ff77782c987f3869e9410d8174146fd07ef
...

View File

@ -1,10 +1,12 @@
{{ if not (.Page.Scratch.Get "mermaid") }}
<!-- Include mermaid only first time -->
<script defer src="{{ "js/mermaid.min.js" | relURL }}"></script>
<script defer>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
mermaid.initialize({
flowchart: { useMaxWidth: true }
});
});
</script>
{{ .Page.Scratch.Set "mermaid" true }}
{{ end }}