种类
Syntax
PAGE.Kind
Returns
string
页面的种类](/getting-started/glossary/#page-kind) 为 home
、 page
、 section
、 taxonomy
或 term
之一。
content/
├── books/
│ ├── book-1/
│ │ └── index.md <-- kind = page
│ ├── book-2.md <-- kind = page
│ └── _index.md <-- kind = section
├── tags/
│ ├── fiction/
│ │ └── _index.md <-- kind = term
│ └── _index.md <-- kind = taxonomy
└── _index.md <-- kind = home
在模板中获取该值:
{{ .Kind }}