Merge commit '8b9803425e63e1b1801f8d5d676e96368d706722'

This commit is contained in:
Bjørn Erik Pedersen
2024-06-21 09:41:24 +02:00
475 changed files with 7408 additions and 4720 deletions

View File

@@ -7,7 +7,7 @@ cascade:
---
<!--
Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
Files within this headless branch bundle are Markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
Include the rendered content using the "include" shortcode.
-->

View File

@@ -48,8 +48,8 @@ Use with the [`template`] function:
{{ end }}
```
[`block`]: /functions/go-template/block
[`template`]: /functions/go-template/block
[`block`]: /functions/go-template/block/
[`template`]: /functions/go-template/block/
[`partial`]: /functions/partials/include/
{{% include "functions/go-template/_common/text-template.md" %}}

View File

@@ -64,6 +64,6 @@ Use `else if` to check multiple conditions.
{{% include "functions/go-template/_common/text-template.md" %}}
[`if`]: /functions/go-template/if
[`with`]: /functions/go-template/with
[`range`]: /functions/go-template/range
[`if`]: /functions/go-template/if/
[`with`]: /functions/go-template/with/
[`range`]: /functions/go-template/range/

View File

@@ -58,8 +58,8 @@ Use with the [`define`] statement:
{{% include "functions/go-template/_common/text-template.md" %}}
[`block`]: /functions/go-template/block
[`define`]: /functions/go-template/define
[`if`]: /functions/go-template/if
[`range`]: /functions/go-template/range
[`with`]: /functions/go-template/with
[`block`]: /functions/go-template/block/
[`define`]: /functions/go-template/define/
[`if`]: /functions/go-template/if/
[`range`]: /functions/go-template/range/
[`with`]: /functions/go-template/with/

View File

@@ -51,4 +51,4 @@ Use `else if` to check multiple conditions.
{{% include "functions/go-template/_common/text-template.md" %}}
[`else`]: /functions/go-template/else
[`else`]: /functions/go-template/else/

View File

@@ -75,7 +75,7 @@ This template will render the page title three times:
Gaining a thorough understanding of context is critical for anyone writing template code.
{{% /note %}}
[`seq`]: functions/collections/seq/
[`seq`]: /functions/collections/seq/
[context]: /getting-started/glossary/#context
## Array or slice of scalars
@@ -194,6 +194,6 @@ Unlike ranging over an array or slice, Hugo sorts by key when ranging over a map
{{% include "functions/go-template/_common/text-template.md" %}}
[`else`]: /functions/go-template/else
[`break`]: /functions/go-template/break
[`continue`]: /functions/go-template/continue
[`else`]: /functions/go-template/else/
[`break`]: /functions/go-template/break/
[`continue`]: /functions/go-template/continue/

View File

@@ -80,7 +80,7 @@ See additional examples in the [partial templates] section.
## Usage
{{% note %}}
Unlike `return` statements in other languages, Hugo executes the first occurrence of the `return` statement regardless of its position within logical blocks
Unlike `return` statements in other languages, Hugo executes the first occurrence of the `return` statement regardless of its position within logical blocks.
{{% /note %}}
A partial that returns a value must contain only one `return` statement, placed at the end of the template.

View File

@@ -13,7 +13,7 @@ action:
signatures: ['template NAME [CONTEXT]']
---
Use the `template` function to execute [internal templates]. For example:
Use the `template` function to execute [embedded templates]. For example:
```go-html-template
{{ range (.Paginate .Pages).Pages }}
@@ -46,4 +46,4 @@ The example above can be rewritten using an [inline partial] template:
[`partial`]: /functions/partials/include/
[inline partial]: /templates/partials/#inline-partials
[internal templates]: /templates/internal
[embedded templates]: /templates/embedded/

View File

@@ -84,4 +84,4 @@ Gaining a thorough understanding of context is critical for anyone writing templ
{{% include "functions/go-template/_common/text-template.md" %}}
[`else`]: /functions/go-template/else
[`else`]: /functions/go-template/else/