Merge commit 'a6e635ca7d905d9ec3ffd708db2694f680b03aae'

This commit is contained in:
Bjørn Erik Pedersen
2024-08-09 15:17:43 +02:00
143 changed files with 3258 additions and 2109 deletions

View File

@@ -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/