hugo/docs/content/en/functions/global/site.md
Bjørn Erik Pedersen 5fd1e74903
Merge commit '9b0050e9aabe4be65c78ccf292a348f309d50ccd' as 'docs'
```
git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash
```

Closes #11925
2024-01-27 10:48:57 +01:00

668 B

title description categories keywords action aliases
site Provides global access to the current Site object.
aliases related returnType signatures
functions/global/page
site
/functions/site

At the top level of a template that receives the Site object in context, these are equivalent:

{{ .Site.Params.foo }}
{{ site.Params.foo }}

When the Site object is not in context, use the global site function:

{{ site.Params.foo }}

{{% note %}} To simplify your templates, use the global site function regardless of whether the Site object is in context. {{% /note %}}