IsNode
Syntax
PAGE.IsNode
Returns
bool
Page 对象上的 IsNode 方法如果页面种类 (页面种类) 是 home 、 section 、 taxonomy 或 term ,则返回 true 。
如果页面种类是 page ,则返回 false 。
content/
├── books/
│ ├── book-1/
│ │ └── index.md <-- kind = page, node = false
│ ├── book-2.md <-- kind = page, node = false
│ └── _index.md <-- kind = section, node = true
├── tags/
│ ├── fiction/
│ │ └── _index.md <-- kind = term, node = true
│ └── _index.md <-- kind = taxonomy, node = true
└── _index.md <-- kind = home, node = true
{{ .IsNode }}