mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-12-21 01:52:19 +01:00
layouts/_default/list.html: Use paginator for page lists instead of custom stuff
Hugo's own pagination stuff works just as well and probably covers even more corner cases. Also, this is one less config variable to have to check because you can just use Paginate (Default: 10).
This commit is contained in:
parent
98a8c2b234
commit
70b4844c63
@ -1,8 +1,7 @@
|
||||
{{ define "main" }}
|
||||
|
||||
{{ $num_recent_posts := .Site.Params.num_recent_posts | default "5" }}
|
||||
|
||||
{{ range first $num_recent_posts (where .Data.Pages "Type" "post") }}
|
||||
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ .Render "summary" }}
|
||||
{{ end }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user