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

913 B

title, description, categories, keywords, params
title description categories keywords params
Home Returns the home Page object for the given site.
functions_and_methods
returnType signatures
page.Page
SITE.Home

The Home method on a Site object is a convenient way to access the home page, and is functionally equivalent to:

{{ .Site.GetPage "/" }}

Because it returns a Page object, you can use any of the available page methods by chaining them. For example:

{{ .Site.Home.Store.Set "greeting" "Hello" }}

This method is commonly used to generate a link to the home page. For example:

Project configuration:

{{< code-toggle file=hugo >}} baseURL = 'https://example.org/docs/' {{< /code-toggle >}}

Template:

{{ .Site.Home.Permalink }} → https://example.org/docs/
{{ .Site.Home.RelPermalink }} → /docs/