From c5eef49486c6091d333c0214e369d7362767b7e1 Mon Sep 17 00:00:00 2001
From: Richard
Date: Thu, 5 May 2022 09:44:54 +0200
Subject: Use hide_summary also for blogs list (#356)
* Use hide_summary also for blogs list
Signed-off-by: Richard Leitner
* README: add additional docu on recent_posts.hide_summary
Mention the fact that recent_posts.hide_summary affects recent posts as
well as blogs list.
Signed-off-by: Richard Leitner
---
README.md | 1 +
layouts/_default/list.html | 2 ++
2 files changed, 3 insertions(+)
diff --git a/README.md b/README.md
index f17baa9..934d3bc 100644
--- a/README.md
+++ b/README.md
@@ -552,6 +552,7 @@ summaryLength = 70
```
Recent posts use `.Summary` property and by default, Hugo automatically takes the first 70 words of your content as its summary and stores it into the `.Summary` page variable for use in your templates. You may customize the summary length by setting summaryLength in your site configuration.
+When setting the `hide_summary` configuration property to `true` the summary will be hidden on the recent posts as well as the blogs list page.
#### Footer
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index fd6ec2f..1e88a43 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -64,9 +64,11 @@
{{ end }}
+ {{ if not .Site.Params.recent_posts.hide_summary }}
{{ .Summary }}
{{ i18n "continueReading" }}
+ {{ end }}
--
cgit v1.2.3