Skip to content

Commit 15004e5

Browse files
authored
Update index.md
1 parent 694cd54 commit 15004e5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

content/en/news/0.57.2-relnotes/index.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,19 @@ images:
99

1010
---
1111

12-
12+
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.
13+
14+
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.
15+
16+
In short, `.Page` home will from 0.58 only return its immediate children (sections and regular pages).
17+
18+
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:
19+
20+
```go-html-template
21+
{{- $pctx := . -}}
22+
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
23+
{{- $pages := $pctx.RegularPages -}}
24+
```
1325

1426
This is a bug-fix release with a couple of important fixes.
1527

0 commit comments

Comments
 (0)