From 57bc2459e262b3106c4ac352f8f5c06dc0cbbcc5 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Mon, 21 Aug 2017 17:18:36 -0500 Subject: use description as the summary if it is provided --- layouts/_default/list.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 752be70..776d677 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -29,8 +29,8 @@
{{ (print . " alt=\"Thumbnail\" />") | safeHTML }}
{{ end }} {{ end }} - {{ if and .Description (or .Params.use_description .Site.Params.use_description) }} - {{ $.Scratch.Set "summary" .Description }} + {{ with .Description }} + {{ $.Scratch.Set "summary" . }} {{ else }} {{ $.Scratch.Set "summary" (delimit (.Content | findRE "((.|\n)*?

\\s*)+") "[…] ") }} {{ end }} -- cgit v1.2.3