Skip to content

Commit

Permalink
replace .RawContent with .Summary - looks way better
Browse files Browse the repository at this point in the history
.Summary retains all formatting of posts for the paginator which looks much nicer than .RawContent. The length of the .Summary (in words, not characters) can be set via the config variable summaryLength.
  • Loading branch information
iromeister committed Feb 11, 2020
1 parent 7b9ac34 commit 2dcf883
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions layouts/index.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ <h2 class="section-header">
<span class="description"> <span class="description">
{{ if isset .Params "description" }} {{ if isset .Params "description" }}
{{ .Description }} {{ .Description }}
{{ else if gt (len .RawContent) 120 }}
{{ slicestr .RawContent 0 120 }}...
{{ else }} {{ else }}
{{ .RawContent }} {{ .Summary }}&hellip;
{{ end }} {{ end }}
</span> </span>
</div> </div>
Expand Down

0 comments on commit 2dcf883

Please sign in to comment.