From a9a0b236d30c4ba69e5a3f45db9ff6626dccc5dc Mon Sep 17 00:00:00 2001 From: Tristan Claverie Date: Mon, 20 Mar 2017 20:53:59 +0100 Subject: [PATCH] Fix the case where latestpostcount is missing from configuration. --- layouts/index.html | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index 6173c5b..e645c72 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -8,24 +8,26 @@ {{ end }} -
- {{ $nbPosts := len (where .Data.Pages "Section" "blog") }} - {{ if gt $nbPosts 0 }} -
Latest posts
- - - {{ if gt $nbPosts .Site.Params.latestpostcount }} - See more ... - {{ end }} +
{{ end }} -
{{ $nbPosts := len (where .Data.Pages "Params.best" true) }}