Skip to content

Commit

Permalink
add support to disable summary Mitrichius#85
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitrichius committed Apr 13, 2021
1 parent b9c021c commit dc52fdf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ params:
paginationSinglePost: true
style: light-without-switcher
readMore: false
disableSummary: false
# utteranc.es support
utterancesRepo: "" # mandatory
utterancesTheme: "" # optional
Expand Down
8 changes: 5 additions & 3 deletions layouts/partials/postSummary.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit dc52fdf

Please sign in to comment.