Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/yihui/hugo-xmag.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYihui Xie <xie@yihui.name>2017-08-22 19:02:58 +0300
committerYihui Xie <xie@yihui.name>2017-08-22 19:02:58 +0300
commit8a680e5395dfc5ccc055c10ed8c2e7cee1063c17 (patch)
tree43228394c0d5d691e36fd88d4d54d208b6b7ff20
parent9d61141b72212b363fc7febf8411edbbaa6dbea2 (diff)
do not truncate summary if it is user-provided
-rw-r--r--layouts/_default/list.html6
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*)+") "[&hellip;] ") }}
+ {{ $.Scratch.Set "summary" ((delimit (findRE "(<p.*?>(.|\n)*?</p>\\s*)+" .Content) "[&hellip;] ") | plainify | truncate (default 200 .Site.Params.summary_length) (default " &hellip;" .Site.Params.text.truncated ) | replaceRE "&amp;" "&" | safeHTML) }}
{{ end }}
- {{ ($.Scratch.Get "summary") | plainify | truncate (default 200 .Site.Params.summary_length) (default " &hellip;" .Site.Params.text.truncated ) | replaceRE "&amp;" "&" | safeHTML }}
+ {{ $.Scratch.Get "summary" }}
</a>
</div>
</section>