Kind
Syntax
PAGE.Kind
Returns
string
页面类型可以是 home(主页)、page(页面)、section(章节)、taxonomy(分类法)或 term(术语)之一。
content/
├── books/
│ ├── book-1/
│ │ └── index.md <-- 类型为 page
│ ├── book-2.md <-- 类型为 page
│ └── _index.md <-- 类型为 section
├── tags/
│ ├── fiction/
│ │ └── _index.md <-- 类型为 term
│ └── _index.md <-- 类型为 taxonomy
└── _index.md <-- 类型为 home
在模板中获取数值的方法:
{{ .Kind }}