From 15004e5b5a42e7dc95bb82202fdd06ec4c565955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 17 Aug 2019 20:20:29 +0200 Subject: [PATCH] Update index.md --- content/en/news/0.57.2-relnotes/index.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/content/en/news/0.57.2-relnotes/index.md b/content/en/news/0.57.2-relnotes/index.md index 8067be8b9..ef9329b9f 100644 --- a/content/en/news/0.57.2-relnotes/index.md +++ b/content/en/news/0.57.2-relnotes/index.md @@ -9,7 +9,19 @@ images: --- - +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 behaviour 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: + +```go-html-template +{{- $pctx := . -}} +{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} +{{- $pages := $pctx.RegularPages -}} +``` This is a bug-fix release with a couple of important fixes.