Fix the case where latestpostcount is missing from configuration.

This commit is contained in:
Tristan Claverie
2017-03-20 20:53:59 +01:00
committed by Alexis Tacnet
parent 80ddd50ee5
commit a9a0b236d3

View File

@@ -8,6 +8,7 @@
</div>
{{ end }}
{{ if isset .Site.Params "latestpostcount" }}
<div class="posts">
{{ $nbPosts := len (where .Data.Pages "Section" "blog") }}
{{ if gt $nbPosts 0 }}
@@ -26,6 +27,7 @@
{{ end }}
{{ end }}
</div>
{{ end }}
<div class="best-posts">
{{ $nbPosts := len (where .Data.Pages "Params.best" true) }}