Add select maximum number of posts per page (#866)
* Add select maximum number of posts per page * Rename ans simplify posts to show * Fix
This commit is contained in:
parent
1aa27921d0
commit
def5ce662e
3 changed files with 6 additions and 3 deletions
|
@ -32,7 +32,8 @@
|
|||
<div class="content container-fluid" id="content">
|
||||
<div class="container-fluid post-card-holder" id="post-card-holder">
|
||||
{{ $posts := where .RegularPagesRecursive "Layout" "!=" "search" }}
|
||||
{{ $paginator := .Paginate $posts 12 }}
|
||||
{{ $numShow := site.Params.features.pagination.maxPostsPerPage | default 12}}
|
||||
{{ $paginator := .Paginate $posts $numShow }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ if .Layout }}
|
||||
{{/* ignore the search.md file*/}}
|
||||
|
|
|
@ -33,7 +33,8 @@
|
|||
<div class="content container-fluid" id="content">
|
||||
<div class="container-fluid post-card-holder" id="post-card-holder">
|
||||
{{ $posts := where .RegularPagesRecursive "Layout" "!=" "search" }}
|
||||
{{ $paginator := .Paginate $posts 12 }}
|
||||
{{ $numShow := site.Params.features.pagination.maxPostsPerPage | default 12}}
|
||||
{{ $paginator := .Paginate $posts $numShow }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ if .Layout }}
|
||||
{{/* ignore the search.md file*/}}
|
||||
|
|
|
@ -33,7 +33,8 @@
|
|||
<div class="content container-fluid" id="content">
|
||||
<div class="container-fluid post-card-holder" id="post-card-holder">
|
||||
{{ $posts := where .RegularPagesRecursive "Layout" "!=" "search" }}
|
||||
{{ $paginator := .Paginate $posts 12 }}
|
||||
{{ $numShow := site.Params.features.pagination.maxPostsPerPage | default 12}}
|
||||
{{ $paginator := .Paginate $posts $numShow }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ if .Layout }}
|
||||
{{/* ignore the search.md file*/}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue