From ea2ea34bf15a70d3515dd9f0713d942faefb357d Mon Sep 17 00:00:00 2001 From: tdro Date: Wed, 12 Oct 2022 22:09:04 -0400 Subject: themes/default/layouts/_default/summary: Store content in variable --- themes/default/layouts/_default/summary.html | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/themes/default/layouts/_default/summary.html b/themes/default/layouts/_default/summary.html index e5b1154..e1e6f73 100644 --- a/themes/default/layouts/_default/summary.html +++ b/themes/default/layouts/_default/summary.html @@ -1,5 +1,9 @@ {{- $limit := gt .WordCount 75 -}} -{{- if $limit -}}{{- end -}} +{{- $content := partial "function-content.html" .Content | safeHTML -}} + +{{- if $limit -}} + +{{- end -}} {{ partial "card-meta-header.html" . }} - {{ if .Params.unsafe }}{{ partial "card-unsafe.html" "begin" }}{{ end }} - {{- partial "function-content.html" .Content | safeHTML -}} - {{ if .Params.unsafe }}{{ partial "card-unsafe.html" "end" }}{{ end }} + {{ if .Params.unsafe }} + {{ partial "card-unsafe.html" "begin" }} + {{- $content -}} + {{ partial "card-unsafe.html" "end" }} + {{ else }} + {{- $content -}} + {{ end }} {{ partial "meta-tags.html" . }} -- cgit v1.2.3