diff options
author | Yihui Xie <xie@yihui.name> | 2017-08-22 19:02:58 +0300 |
---|---|---|
committer | Yihui Xie <xie@yihui.name> | 2017-08-22 19:02:58 +0300 |
commit | 8a680e5395dfc5ccc055c10ed8c2e7cee1063c17 (patch) | |
tree | 43228394c0d5d691e36fd88d4d54d208b6b7ff20 | |
parent | 9d61141b72212b363fc7febf8411edbbaa6dbea2 (diff) |
do not truncate summary if it is user-provided
-rw-r--r-- | layouts/_default/list.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 776d677..cfa9c9b 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -30,11 +30,11 @@ {{ end }} {{ end }} {{ with .Description }} - {{ $.Scratch.Set "summary" . }} + {{ $.Scratch.Set "summary" (markdownify .) }} {{ else }} - {{ $.Scratch.Set "summary" (delimit (.Content | findRE "(<p.*?>(.|\n)*?</p>\\s*)+") "[…] ") }} + {{ $.Scratch.Set "summary" ((delimit (findRE "(<p.*?>(.|\n)*?</p>\\s*)+" .Content) "[…] ") | plainify | truncate (default 200 .Site.Params.summary_length) (default " …" .Site.Params.text.truncated ) | replaceRE "&" "&" | safeHTML) }} {{ end }} - {{ ($.Scratch.Get "summary") | plainify | truncate (default 200 .Site.Params.summary_length) (default " …" .Site.Params.text.truncated ) | replaceRE "&" "&" | safeHTML }} + {{ $.Scratch.Get "summary" }} </a> </div> </section> |