IsHome
Syntax
PAGE.IsHome
Returns
bool
Page 对象上的 IsHome 方法会返回 true,如果该页面的 页面类型 是 home。
content/
├── books/
│ ├── book-1/
│ │ └── index.md <-- 页面类型 = page
│ ├── book-2.md <-- 页面类型 = page
│ └── _index.md <-- 页面类型 = section
└── _index.md <-- 页面类型 = home
{{ .IsHome }}