From 89357fefec5b6dc4f5d102e22ff98240477f640a Mon Sep 17 00:00:00 2001 From: Quentin Baker Date: Tue, 12 Oct 2021 14:46:36 -0400 Subject: [PATCH 1/2] modified post summary to use desc if provided --- layouts/partials/post-summary.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/layouts/partials/post-summary.html b/layouts/partials/post-summary.html index 7961f62..1098719 100644 --- a/layouts/partials/post-summary.html +++ b/layouts/partials/post-summary.html @@ -6,7 +6,11 @@ {{ if not .Site.Params.disableSummary }}
- {{ .Summary | safeHTML }} + {{ if isset .Params "description" }} + {{ .Description }} + {{ else }} + {{ .Summary }}… + {{ end }}
{{ end }} {{ if and (.Truncated) (.Site.Params.readMore) }} From f5b19225a0b5f5a1b302acbf0d349a5880176112 Mon Sep 17 00:00:00 2001 From: Quentin Baker Date: Tue, 12 Oct 2021 14:49:21 -0400 Subject: [PATCH 2/2] use safeHTML on summary text --- layouts/partials/post-summary.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/post-summary.html b/layouts/partials/post-summary.html index 1098719..12dd4c9 100644 --- a/layouts/partials/post-summary.html +++ b/layouts/partials/post-summary.html @@ -7,9 +7,9 @@ {{ if not .Site.Params.disableSummary }}
{{ if isset .Params "description" }} - {{ .Description }} + {{ .Description | safeHTML }} {{ else }} - {{ .Summary }}… + {{ .Summary | safeHTML }}… {{ end }}
{{ end }}