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

github.com/jesselau76/hugo-w3-simple.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/_default/list.html18
1 files changed, 9 insertions, 9 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index c128195..0669cb2 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -56,16 +56,16 @@
<div class="w3-container wraptext w3-white">
<code> {{ .Date.Format "2006/01/02" }} </code>
-
-
- {{ if gt (len .Summary) 200 }}
-
-
- <p>{{substr .Summary 0 200 }}...</p>
-
-
- {{ end }}
+ <p>
+ {{ with .Description }}
+ {{ $.Scratch.Set "summary" (markdownify .) }}
+ {{ else }}
+ {{ $.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" }}
+ </p>
+
</div>
<footer >