mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
9b0050e9aa
git-subtree-dir: docs git-subtree-split: 5c085a37b297bf12f59efeaae591418ec025c10d
668 B
668 B
title | description | categories | keywords | action | aliases | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
site | Provides global access to the current Site object. |
|
|
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 %}}