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

@@ -12,17 +12,19 @@ action:
aliases: [/functions/site]
---
At the top level of a template that receives the `Site` object in context, these are equivalent:
Use the `site` function to return the `Site` object regardless of current context.
```go-html-template
{{ .Site.Params.foo }}
{{ site.Params.foo }}
```
When the `Site` object is not in context, use the global `site` function:
When the `Site` object is in context you can use the `Site` property:
```go-html-template
{{ site.Params.foo }}
<!-- current context -->
{{ .Site.Params.foo }}
<!-- template context -->
{{ $.Site.Params.foo }}
```
{{% note %}}