We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hugo version
$ hugo version Hugo Static Site Generator v0.60.0-DEV darwin/amd64 BuildDate: unknown
I'm using a pre-release build, but this is also present with the released version, hugo 0.59.
In the documentation, it says that:
.Pages on the Homepage In addition to the standard page variables, the homepage template has access to all site content via .Pages.
.Pages on the Homepage
.Pages
In addition to the standard page variables, the homepage template has access to all site content via .Pages.
However, I'm not seeing this. I have this template:
{{ range .Pages }} {{ . }} <br> Kind: {{ .Kind }} <br> Type: {{ .Type }} <br> {{ end }}
And the output shows only my top-level section pages:
Page(/posts) Kind: section Type: posts Page(/pages) Kind: section Type: pages
If I use .Site.Pages I get all the pages on the site. I ended up adjusting my template like this to get just the posts:
.Site.Pages
{{ range where .Pages "Section" "posts" }} {{ range first 10 .Pages }} {{ . }} <br> Kind: {{ .Kind }} <br> Type: {{ .Type }} <br> {{ end }} {{ end }}
I'm not sure if this is a bug in Hugo or the documentation.
The text was updated successfully, but these errors were encountered:
14a985f
Update homepage.md
fcaad65
Fixes gohugoio/hugo#6510
df96f9e
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sorry, something went wrong.
No branches or pull requests
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
I'm using a pre-release build, but this is also present with the released version, hugo 0.59.
In the documentation, it says that:
However, I'm not seeing this. I have this template:
And the output shows only my top-level section pages:
If I use
.Site.Pages
I get all the pages on the site. I ended up adjusting my template like this to get just the posts:I'm not sure if this is a bug in Hugo or the documentation.
The text was updated successfully, but these errors were encountered: