IsSection
Syntax
PAGE.IsSection
Returns
bool
IsSection 方法用于 Page 对象,在页面种类为 section 时返回 true。
content/
├── books/
│ ├── book-1/
│ │ └── index.md <-- 页面种类 = page
│ ├── book-2.md <-- 页面种类 = page
│ └── _index.md <-- 页面种类 = section
└── _index.md <-- 页面种类 = home
{{ .IsSection }}