# Home
> 返回给定站点的首页 Page 对象。
- 官方英文原文：https://gohugo.io/methods/site/home/
- 本页规范地址：https://hugozh.cn/methods/site/home/
- 最近更新：2026-10-02
- 最后提交：912b1d3 chore(site): 添加 static/CNAME（hugozh.cn），供 GitHub Pages 等平台绑定自定义域名
- 签名：SITE.Home
- 返回类型：page.Page
- 站点：Hugo 中文文档（https://hugozh.cn/）· 社区维护的非官方中文翻译，如有出入以官方英文原文为准

---
`Site` 对象上的 `Home` 方法是访问首页的便捷方式，其功能等价于：

```go-html-template
{{ .Site.GetPage "/" }}
```

由于它返回 `Page` 对象，你可以通过链式调用使用任何可用的 [page 方法][]。例如：

```go-html-template
{{ .Site.Home.Store.Set "greeting" "Hello" }}
```

这个方法常用于生成指向首页的链接。例如：

项目配置：

```toml
baseURL = 'https://example.org/docs/'
```

模板：

```go-html-template
{{ .Site.Home.Permalink }} → https://example.org/docs/
{{ .Site.Home.RelPermalink }} → /docs/
```

[page 方法]: /methods/page/

