From dc52fdf1b007abb84695f533024bcf15b04ca4b2 Mon Sep 17 00:00:00 2001 From: Dmitry Kolosov Date: Tue, 13 Apr 2021 20:20:58 +0300 Subject: [PATCH] add support to disable summary #85 --- README.md | 1 + layouts/partials/postSummary.html | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a2ce7a1..9bf1388 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,7 @@ params: paginationSinglePost: true style: light-without-switcher readMore: false + disableSummary: false # utteranc.es support utterancesRepo: "" # mandatory utterancesTheme: "" # optional diff --git a/layouts/partials/postSummary.html b/layouts/partials/postSummary.html index 320cf5f..a348bc9 100644 --- a/layouts/partials/postSummary.html +++ b/layouts/partials/postSummary.html @@ -3,9 +3,11 @@

{{ trim .Title " " }}

-
- {{ .Summary | safeHTML }} -
+ {{ if not .Site.Params.disableSummary }} +
+ {{ .Summary | safeHTML }} +
+ {{ end }} {{ if and (.Truncated) (.Site.Params.readMore) }}
{{ i18n "readMore" | humanize }}