From e253038e4d763f03b598956a296567a9cceb4cb8 Mon Sep 17 00:00:00 2001 From: Leon Mika Date: Mon, 29 Dec 2025 10:17:30 +1100 Subject: [PATCH] Added summary parameter --- layouts/shortcodes/postlist.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/shortcodes/postlist.html b/layouts/shortcodes/postlist.html index afa9f53..040402f 100644 --- a/layouts/shortcodes/postlist.html +++ b/layouts/shortcodes/postlist.html @@ -3,6 +3,7 @@ {{- $parOrder := or (and .Params (.Get "order")) "" -}} {{- $parLimit := or (and .Params (.Get "limit")) "" -}} {{- $parDisplay := or (and .Params (.Get "display")) "" -}} +{{- $parSummaries := or (and .Params (.Get "summaries")) "if-available" -}} {{- $pgr := where .Site.RegularPages "Section" "ne" "" -}} {{- $pgr = where $pgr "Section" "not in" (slice "replies") -}} @@ -45,7 +46,7 @@
{{ if .Title }}

{{ .Title }}

- {{ if .Params.custom_summary }} + {{ if and (ne $parSummaries "none") .Params.custom_summary }}

{{ .Summary | safeHTML }}

@@ -71,7 +72,7 @@ {{ range $pgr }} {{- if (ne .LinkTitle "") -}}
  • {{ .LinkTitle }}
  • - {{- else if (ne .Summary "") -}} + {{- else if and (ne $parSummaries "none") (ne .Summary "") -}}
  • {{ .Summary | safeHTML | truncate 70 }}
  • {{- else -}}
  • {{ .Content | safeHTML | truncate 70 }}