diff options
author | Dmitry Kolosov <mitrichius@gmail.com> | 2021-04-13 20:20:58 +0300 |
---|---|---|
committer | Dmitry Kolosov <mitrichius@gmail.com> | 2021-04-13 20:20:58 +0300 |
commit | dc52fdf1b007abb84695f533024bcf15b04ca4b2 (patch) | |
tree | 5b39b17c0baf4df3cfa8119b4efa7295c2b347e4 | |
parent | b9c021cab74e6e69644f6566c7f5af037ab60cbd (diff) |
add support to disable summary #85
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | layouts/partials/postSummary.html | 8 |
2 files changed, 6 insertions, 3 deletions
@@ -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 @@ <h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}"><a class="u-url" href="{{ .RelPermalink }}">{{ trim .Title " " }}</a></h1> </header> - <div class="content post-summary p-summary"> - {{ .Summary | safeHTML }} - </div> + {{ if not .Site.Params.disableSummary }} + <div class="content post-summary p-summary"> + {{ .Summary | safeHTML }} + </div> + {{ end }} {{ if and (.Truncated) (.Site.Params.readMore) }} <div class="read-more"> <a class="u-url" href="{{ .RelPermalink }}">{{ i18n "readMore" | humanize }}</a> |