use .Page.Site instead of site to access data assets (#541)

This commit is contained in:
Robert Kaussow 2022-11-16 10:41:02 +01:00 committed by GitHub
parent 74e4d13673
commit 54b7d1388f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
<!-- prettier-ignore-start -->
{{ if not (.Page.Scratch.Get "mermaid") }}
<!-- 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 }}
{{ end }}
<!-- prettier-ignore-end -->