Skip to content

Commit

Permalink
fix page lists, Hugo v0.57
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gyorb committed Aug 21, 2019
1 parent 93bf662 commit b0d2bc7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b0d2bc7

Please # to comment.