1
0
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:
Alan Orth 2016-10-05 15:45:38 +03:00
parent 98a8c2b234
commit 70b4844c63
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -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 }}