mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2025-05-10 22:46:02 +02:00
Add option to control post truncation.
This commit is contained in:
@ -29,9 +29,14 @@
|
||||
|
||||
{{ define "main" }}
|
||||
|
||||
{{ $truncate := default true .Site.Params.truncate }}
|
||||
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ if $truncate }}
|
||||
{{ .Render "summary" }}
|
||||
{{ else }}
|
||||
{{ .Render "content" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||
|
Reference in New Issue
Block a user