Files
hugo/docs/content/en/functions/global/site.md
T
2026-07-03 10:43:53 +02:00

679 B

title, description, categories, keywords, params, aliases
title description categories keywords params aliases
site Provides global access to the current Site object.
functions_and_methods
aliases returnType signatures
site
/functions/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 }}

Note

To simplify your templates, use the global site function regardless of whether the Site object is in context.