Improve the filtering of the pages display on the home page

This commit is contained in:
Thomas Schwery 2020-02-08 22:32:39 +01:00
parent 7224339674
commit 332e017df7

View file

@ -4,7 +4,8 @@
<div class="content row">
<div class="col-sm-8">
<main role="main">
{{ $recettePages := where .Site.Pages ".Kind" "==" "page" }}
{{ $recettePages := where .Site.Pages ".Section" "==" "recettes" }}
{{ $recettePages := where $recettePages ".Kind" "==" "page" }}
{{ $recetteSorted := sort $recettePages ".Date" "desc" }}
{{ $paginator := .Paginate $recetteSorted 20 }}
{{ range $paginator.Pages }}