diff options
author | Gyorgy Orban <o.gyorgy@gmail.com> | 2019-08-20 15:50:02 +0300 |
---|---|---|
committer | Gyorgy Orban <o.gyorgy@gmail.com> | 2019-08-21 23:24:32 +0300 |
commit | b0d2bc7f46f07c8ffe1bd8b2ad3871603f52376d (patch) | |
tree | 10888515abb353af402dfddca577e8b91d1df567 | |
parent | 93bf662c980660eb1551bbed1b0fbb37c227f48e (diff) |
fix page lists, Hugo v0.57
Hugo v0.57 introduced a breaking change in mainSections.
Using .Site.RegularPages for the home page to resolve the issue.
mainSections is meant for the homepage.
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | layouts/index.html | 2 | ||||
-rw-r--r-- | theme.toml | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index d08b0be..c2200f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,11 @@ ## [Unreleased] ### Changed - * minimal required Hugo version is v0.55 + * minimal required Hugo version is v0.57.2 * sort posts/pages on the error page by last modification date ### Fixed + * fix breaking change in mainSections introduced in Hugo v0.57.0 * deprecation warnings during site build with v0.55 and newer * optimize image size when viewed on mobile devices diff --git a/layouts/index.html b/layouts/index.html index 44b4b51..cb54c08 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -3,7 +3,7 @@ <main> -{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }} +{{ $paginator := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }} {{ range $paginator.Pages }} {{ .Render "summary" }} {{ end }} @@ -5,7 +5,7 @@ description = "A minimalistic dark responsive theme." homepage = "https://github.com/gyorb/hugo-dusk" tags = ["blog", "responsive", "google analytics", "disqus", "syntax highlighting", "custom themes", "minimal", "minimalist", "clean", "dark"] features = ["blog"] -min_version = 0.55 +min_version = "0.57.2" [author] name = "Gyorgy Orban" |