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

github.com/Mitrichius/hugo-theme-anubis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kolosov <mitrichius@gmail.com>2021-04-13 20:20:58 +0300
committerDmitry Kolosov <mitrichius@gmail.com>2021-04-13 20:20:58 +0300
commitdc52fdf1b007abb84695f533024bcf15b04ca4b2 (patch)
tree5b39b17c0baf4df3cfa8119b4efa7295c2b347e4
parentb9c021cab74e6e69644f6566c7f5af037ab60cbd (diff)
add support to disable summary #85
-rw-r--r--README.md1
-rw-r--r--layouts/partials/postSummary.html8
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 @@
<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>