Merge commit '346b60358dd8ec2ca228e6635bff9d7914b398b7'

This commit is contained in:
Bjørn Erik Pedersen
2025-01-23 09:47:46 +01:00
384 changed files with 3305 additions and 3271 deletions

View File

@@ -15,10 +15,10 @@ aliases: [/content/sections/]
## Overview
A section is a top-level content directory, or any content directory with an _index.md file. A content directory with an _index.md file is also known as a [branch bundle](/getting-started/glossary/#branch-bundle). Section templates receive one or more page [collections](/getting-started/glossary/#collection) in [context](/getting-started/glossary/#context).
A section is a top-level content directory, or any content directory with an `_index.md` file. A content directory with an `_index.md` file is also known as a [branch bundle](g). Section templates receive one or more page [collections](g) in [context](g).
{{% note %}}
Although top-level directories without _index.md files are sections, we recommend creating _index.md files in _all_ sections.
Although top-level directories without `_index.md` files are sections, we recommend creating `_index.md` files in _all_ sections.
{{% /note %}}
A typical site consists of one or more sections. For example:
@@ -92,15 +92,15 @@ With the file structure from the [example above](#overview):
Content directory|Section template
:--|:--
content/products|layouts/products/list.html
content/products/product-1|layouts/products/list.html
content/products/product-1/benefits|layouts/products/list.html
`content/products`|`layouts/products/list.html`
`content/products/product-1`|`layouts/products/list.html`
`content/products/product-1/benefits`|`layouts/products/list.html`
Content directory|Single template
:--|:--
content/products|layouts/products/single.html
content/products/product-1|layouts/products/single.html
content/products/product-1/benefits|layouts/products/single.html
`content/products`|`layouts/products/single.html`
`content/products/product-1`|`layouts/products/single.html`
`content/products/product-1/benefits`|`layouts/products/single.html`
If you need to use a different template for a subsection, specify `type` and/or `layout` in front matter.