fix: fix access to data assets in render hook (#348)

This commit is contained in:
Robert Kaussow 2022-12-21 13:46:50 +01:00 committed by GitHub
parent e3c9a7a93d
commit 0968dd7a49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
<!-- prettier-ignore-start --> <!-- prettier-ignore-start -->
{{ if not (.Page.Scratch.Get "mermaid") }} {{ if not (.Page.Scratch.Get "mermaid") }}
<!-- Include mermaid only first time --> <!-- Include mermaid only first time -->
<script defer src="{{ index (index .Site.Data.assets "mermaid.js") "src" | relURL }}"></script> <script defer src="{{ index (index .Page.Site.Data.assets "mermaid.js") "src" | relURL }}"></script>
{{ .Page.Scratch.Set "mermaid" true }} {{ .Page.Scratch.Set "mermaid" true }}
{{ end }} {{ end }}
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->