mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
Merge commit 'a6e635ca7d905d9ec3ffd708db2694f680b03aae'
This commit is contained in:
@@ -71,13 +71,13 @@ The following demonstrates the relationships between your content organization a
|
||||
|
||||
### Index pages: `_index.md`
|
||||
|
||||
`_index.md` has a special role in Hugo. It allows you to add front matter and content to your [list templates][lists]. These templates include those for [section templates], [taxonomy templates], [taxonomy terms templates], and your [homepage template].
|
||||
`_index.md` has a special role in Hugo. It allows you to add front matter and content to `home`, `section`, `taxonomy`, and `term` pages.
|
||||
|
||||
{{% note %}}
|
||||
**Tip:** You can get a reference to the content and metadata in `_index.md` using the [`.Site.GetPage` function](/methods/page/getpage).
|
||||
{{% /note %}}
|
||||
|
||||
You can create one `_index.md` for your homepage and one in each of your content sections, taxonomies, and taxonomy terms. The following shows typical placement of an `_index.md` that would contain content and front matter for a `posts` section list page on a Hugo website:
|
||||
You can create one `_index.md` for your home page and one in each of your content sections, taxonomies, and terms. The following shows typical placement of an `_index.md` that would contain content and front matter for a `posts` section list page on a Hugo website:
|
||||
|
||||
```txt
|
||||
. url
|
||||
@@ -106,7 +106,7 @@ The [sections] can be nested as deeply as you want. The important thing to under
|
||||
|
||||
### Single pages in sections
|
||||
|
||||
Single content files in each of your sections will be rendered as [single page templates][singles]. Here is an example of a single `post` within `posts`:
|
||||
Single content files in each of your sections will be rendered by a [single template]. Here is an example of a single `post` within `posts`:
|
||||
|
||||
```txt
|
||||
path ("posts/my-first-hugo-post.md")
|
||||
@@ -156,14 +156,7 @@ The `url` is the entire URL path, defined by the file path and optionally overri
|
||||
[formats]: /content-management/formats/
|
||||
[front matter]: /content-management/front-matter/
|
||||
[getpage]: /methods/page/getpage/
|
||||
[homepage template]: /templates/homepage/
|
||||
[homepage]: /templates/homepage/
|
||||
[lists]: /templates/lists/
|
||||
[pretty]: /content-management/urls/#appearance
|
||||
[section templates]: /templates/section-templates/
|
||||
[sections]: /content-management/sections/
|
||||
[singles]: /templates/single-page-templates/
|
||||
[taxonomy templates]: /templates/taxonomy-templates/
|
||||
[taxonomy terms templates]: /templates/taxonomy-templates/
|
||||
[types]: /content-management/types/
|
||||
[single template]: /templates/types/#single
|
||||
[urls]: /content-management/urls/
|
||||
|
Reference in New Issue
Block a user