mirror of https://github.com/gohugoio/hugo
680 B
680 B
title | description | categories | keywords | params | aliases | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
site | Provides global access to the current Site object. |
|
|
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 }}
[!note] To simplify your templates, use the global
site
function regardless of whether theSite
object is in context.