mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
Merge commit 'b6b37a1f00f808f3c0d2715f65ca2d3091f36495'
This commit is contained in:
@@ -36,9 +36,9 @@ The homepage, similar to other [list pages in Hugo][lists], accepts content and
|
||||
|
||||
See the homepage template below or [Content Organization][contentorg] for more information on the role of `_index.md` in adding content and front matter to list pages.
|
||||
|
||||
## `.Data.Pages` on the Homepage
|
||||
## `.Pages` on the Homepage
|
||||
|
||||
In addition to the standard [page variables][pagevars], the homepage template has access to *all* site content via `.Data.Pages`.
|
||||
In addition to the standard [page variables][pagevars], the homepage template has access to *all* site content via `.Pages`.
|
||||
|
||||
## Example Homepage Template
|
||||
|
||||
@@ -58,8 +58,8 @@ The following is an example of a homepage template that uses [partial][partials]
|
||||
{{.Content}}
|
||||
</div>
|
||||
<div>
|
||||
<!-- Note that .Data.Pages is the equivalent of .Site.Pages on the homepage template. -->
|
||||
{{ range first 10 .Data.Pages }}
|
||||
<!-- Note that .Pages is the same as .Site.RegularPages on the homepage template. -->
|
||||
{{ range first 10 .Pages }}
|
||||
{{ .Render "summary"}}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user