From 2d5dd34c50a3a35602c06137c12f697b17c6478e Mon Sep 17 00:00:00 2001 From: Jaroslav Lichtblau Date: Sun, 8 Dec 2019 23:13:56 +0100 Subject: [PATCH] Fix for home.Pages behaviour change in Hugo in version 0.58.0 and later There was a change in Hugo in version 0.58.0 and later changing the behaviour of home.Pages value. This pull request fixes the AllinOne theme home page to behave same as prior the 0.58.0 version. --- layouts/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index a3832de..d4a5c6d 100755 --- a/layouts/index.html +++ b/layouts/index.html @@ -36,14 +36,14 @@

{{ $.Site.Params.welcome_head }}

- {{ $totalpostscount := len (.Data.Pages) }} + {{ $totalpostscount := len (.Site.RegularPages) }} {{ $latestpostscount := .Site.Params.latestpostscount | default $totalpostscount }} {{ if gt $latestpostscount 0 }}
- {{ range (first $latestpostscount .Data.Pages.ByPublishDate.Reverse ) }} + {{ range (first $latestpostscount .Site.RegularPages.ByPublishDate.Reverse ) }} {{ partial "post-card.html" . }} {{ end }} @@ -57,4 +57,4 @@

{{ $.Site.Params.welcome_head }}

-{{ end }} \ No newline at end of file +{{ end }}