Skip to content

Commit c667ab2

Browse files
committed
fix(page-resource-content): avoid rendering invalid Markdown
1 parent 3150609 commit c667ab2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

layouts/shortcodes/page-resource-content.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
{{- $markdown = .Get 1 }}
55
{{- end }}
66
{{- with .Page.Resources.Get $name }}
7-
{{- cond $markdown (.Content | $.Page.RenderString) .Content }}
7+
{{- if $markdown }}
8+
{{- .Content | $.Page.RenderString }}
9+
{{- else }}
10+
{{- .Content }}
11+
{{- end }}
812
{{- end }}

0 commit comments

Comments
 (0)