forked from drowl87/hextra_mirror
fix: mermaid script was skipped on home page (#637)
This commit is contained in:
parent
17de708c9f
commit
38c8ee1168
@ -1,4 +1,4 @@
|
|||||||
<pre class="mermaid hx-mt-6">
|
<pre class="mermaid hx-mt-6">
|
||||||
{{- .Inner | safeHTML -}}
|
{{ .Inner | htmlEscape | safeHTML }}
|
||||||
</pre>
|
</pre>
|
||||||
{{- .Page.Store.Set "hasMermaid" true -}}
|
{{- .Page.Store.Set "hasMermaid" true -}}
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
{{- partial "scripts/search.html" . -}}
|
{{- partial "scripts/search.html" . -}}
|
||||||
|
|
||||||
{{/* Mermaid */}}
|
{{/* Mermaid */}}
|
||||||
{{/* FIXME: need to investigate .Page.Store hasMermaid is set for homepage */}}
|
{{- if (.Store.Get "hasMermaid") -}}
|
||||||
{{- if and (.Page.Store.Get "hasMermaid") (not .Page.IsHome) -}}
|
|
||||||
{{- partial "scripts/mermaid.html" . -}}
|
{{- partial "scripts/mermaid.html" . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user