mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
Merge commit 'b6b37a1f00f808f3c0d2715f65ca2d3091f36495'
This commit is contained in:
@@ -51,14 +51,14 @@ This will print out a list of all the variables scoped to the current context
|
||||
When developing a [homepage][], what does one of the pages you're looping through look like?
|
||||
|
||||
```
|
||||
{{ range .Data.Pages }}
|
||||
{{ range .Pages }}
|
||||
{{/* The context, ".", is now each one of the pages as it goes through the loop */}}
|
||||
{{ printf "%#v" . }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
{{% note "`.Data.Pages` on the Homepage" %}}
|
||||
`.Data.Pages` on the homepage is equivalent to `.Site.Pages`.
|
||||
{{% note "`.Pages` on the Homepage" %}}
|
||||
`.Pages` on the homepage is equivalent to `.Site.RegularPages`.
|
||||
{{% /note %}}
|
||||
|
||||
## Why Am I Showing No Defined Variables?
|
||||
@@ -78,4 +78,4 @@ This example will render the header partial, but the header partial will not hav
|
||||
The dot (`.`) is considered fundamental to understanding Hugo templating. For more information, see [Introduction to Hugo Templating][tempintro].
|
||||
|
||||
[homepage]: /templates/homepage/
|
||||
[tempintro]: /templates/introduction/
|
||||
[tempintro]: /templates/introduction/
|
||||
|
Reference in New Issue
Block a user