mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
913 B
913 B
title, description, categories, keywords, params
| title | description | categories | keywords | params | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Home | Returns the home Page object for the given site. |
|
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/