mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-22 12:50:40 +00:00
fix: fix access to data assets in render hook (#539)
Site variables in markdown render hooks or partials need to be accessed via global site function or .Page object.
This commit is contained in:
parent
4dc4c9e4eb
commit
74e4d13673
@ -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 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 -->
|
||||||
|
Loading…
Reference in New Issue
Block a user