hugo/docs/content/en/functions/site/index.md
2023-10-20 09:43:56 +02:00

714 B

title description categories keywords menu function relatedFunctions aliases
site Provides global access to the .Site object.
functions
docs
parent
functions
aliases returnType signatures
site
hugo
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 %}}