类型
语法
PAGE.Kind
返回值
string
页面类型为 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 }}