Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'

This commit is contained in:
Bjørn Erik Pedersen
2023-12-04 15:24:01 +01:00
810 changed files with 24147 additions and 7766 deletions

View File

@@ -9,8 +9,8 @@ menu:
parent: templates
weight: 80
weight: 80
aliases: [/templates/sections/]
toc: true
aliases: [/templates/sections/]
---
## Add content and front matter to section templates
@@ -25,7 +25,7 @@ See [Template Lookup](/templates/lookup-order/).
Every `Page` in Hugo has a `.Kind` attribute.
{{% page-kinds %}}
{{% include "content-management/_common/page-kinds.md" %}}
## `.Site.GetPage` with sections
@@ -43,7 +43,7 @@ Examples:
## Example: creating a default section template
{{< code file="layouts/_default/section.html" >}}
{{< code file=layouts/_default/section.html >}}
{{ define "main" }}
<main>
{{ .Content }}
@@ -69,10 +69,10 @@ The `.Site.GetPage` example that follows assumes the following project directory
.
└── content
├── blog
   ├── _index.md # "title: My Hugo Blog" in the front matter
   ├── post-1.md
   ├── post-2.md
   └── post-3.md
├── _index.md # "title: My Hugo Blog" in the front matter
├── post-1.md
├── post-2.md
└── post-3.md
└── events #Note there is no _index.md file in "events"
├── event-1.md
└── event-2.md
@@ -103,7 +103,7 @@ Which then returns the following:
```
[contentorg]: /content-management/organization/
[getpage]: /functions/getpage/
[getpage]: /methods/page/getpage
[lists]: /templates/lists/
[lookup]: /templates/lookup-order/
[`where`]: /functions/collections/where