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

github.com/devcows/hugo-universal-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard <g0hl1n@users.noreply.github.com>2022-05-05 10:44:54 +0300
committerGitHub <noreply@github.com>2022-05-05 10:44:54 +0300
commitc5eef49486c6091d333c0214e369d7362767b7e1 (patch)
tree1eefa40a8c26c0476c2b2e9873adbe4d90b56b9c
parent431e836a81aad0e4771ea3083cfc8b242340e510 (diff)
Use hide_summary also for blogs list (#356)
* Use hide_summary also for blogs list Signed-off-by: Richard Leitner <dev@bubus.at> * 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 <dev@g0hl1n.net>
-rw-r--r--README.md1
-rw-r--r--layouts/_default/list.html2
2 files changed, 3 insertions, 0 deletions
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 @@
</p>
{{ end }}
</div>
+ {{ if not .Site.Params.recent_posts.hide_summary }}
<p class="intro">{{ .Summary }}</p>
<p class="read-more"><a href="{{ .Permalink }}" class="btn btn-template-main">{{ i18n "continueReading" }}</a>
</p>
+ {{ end }}
</div>
</div>
</section>