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

github.com/jpescador/hugo-future-imperfect.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Collins <thepatrickcollins@gmail.com>2017-12-10 23:05:57 +0300
committerGitHub <noreply@github.com>2017-12-10 23:05:57 +0300
commit88c21a682b7c46d9fee39e9e58ad46df513717ed (patch)
tree610d7d6f790ed0f060d0deae1d2732d5c9019321
parentb5cc3f607c9deb2e489e759699e426f7cfbbbf8a (diff)
Change list summary from plain text to html (#71)
-rw-r--r--layouts/post/content-list.html20
1 files changed, 10 insertions, 10 deletions
diff --git a/layouts/post/content-list.html b/layouts/post/content-list.html
index 5662909..4cfd087 100644
--- a/layouts/post/content-list.html
+++ b/layouts/post/content-list.html
@@ -1,12 +1,12 @@
<article class="post">
- {{ .Render "header" }}
- {{ .Render "featured" }}
- <p>{{ printf "%s" .Summary | markdownify }}</p>
-
- <footer>
- <ul class="actions">
- <li><a href="{{ .RelPermalink }}" class="button big">Continue Reading</a></li>
- </ul>
- {{ .Render "footer-category" }}
- </footer>
+ {{ .Render "header" }}
+ {{ .Render "featured" }}
+ {{ $.Scratch.Set "summary" ((delimit (findRE "<p.*?>(.|\n)*?</p>" .Content 1) "") | truncate (default 500 .Site.Params.summary_length) (default "&hellip;" .Site.Params.text.truncated ) | replaceRE "&amp;" "&" | safeHTML) }}
+ {{ $.Scratch.Get "summary" }}
+ <footer>
+ <ul class="actions">
+ <li><a href="{{ .RelPermalink }}" class="button big">Continue Reading</a></li>
+ </ul>
+ {{ .Render "footer-category" }}
+ </footer>
</article>