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