Skip to content

Commit 38c8ee1

Browse files
authored
fix: mermaid script was skipped on home page (#637)
1 parent 17de708 commit 38c8ee1

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<pre class="mermaid hx-mt-6">
2-
{{- .Inner | safeHTML -}}
2+
{{ .Inner | htmlEscape | safeHTML }}
33
</pre>
44
{{- .Page.Store.Set "hasMermaid" true -}}

layouts/partials/scripts.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
{{- partial "scripts/search.html" . -}}
66

77
{{/* Mermaid */}}
8-
{{/* FIXME: need to investigate .Page.Store hasMermaid is set for homepage */}}
9-
{{- if and (.Page.Store.Get "hasMermaid") (not .Page.IsHome) -}}
8+
{{- if (.Store.Get "hasMermaid") -}}
109
{{- partial "scripts/mermaid.html" . -}}
1110
{{- end -}}
1211

0 commit comments

Comments
 (0)