hugo/content/en/news/0.57.2-relnotes/index.md
Bjørn Erik Pedersen b9bd35d72e Squashed 'docs/' content from commit fdea5430f
git-subtree-dir: docs
git-subtree-split: fdea5430f89dfd849d39212abdf5ace0a4763e5a
2019-10-21 10:22:28 +02:00

2.4 KiB


date: 2019-08-17 title: "Hugo 0.57.2: A couple of Bug Fixes" description: "This version fixes a couple of bugs introduced in 0.57.0." categories: ["Releases"] images:

  • images/blog/hugo-bug-poster.png

Hugo 0.57.0 had some well-intended breaking changes. And while they made a lot of sense, one of them made a little too much noise.

This release reverts the behavior for .Pages on the home page to how it behaved in 0.56, but adds a WARNING telling you what to do to prepare for Hugo 0.58.

In short, .Page home will from 0.58 only return its immediate children (sections and regular pages).

In this release it returns .Site.RegularPages. So to prepare for Hugo 0.58 you can either use .Site.RegularPages in your home template, or if you have a general list.html or RSS template, you can do something like this:

{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := $pctx.RegularPages -}}