site
Provides global access to the current Site object.
Syntax
site
Use the site function to return the Site object regardless of current context.
{{ site.Params.foo }}When the Site object is in context you can use the Site property:
<!-- current context -->
{{ .Site.Params.foo }}
<!-- template context -->
{{ $.Site.Params.foo }}To simplify your templates, use the global site function regardless of whether the Site object is in context.
Last updated:
April 10, 2025
:
Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)
Improve this page