mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
1005 B
1005 B
title, description, categories, keywords, params
| title | description | categories | keywords | params | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| IsNode | Reports whether the given page is a node. |
|
The IsNode method on a Page object checks if the page kind is one of the following: home, section, taxonomy, or term. If it is, the method returns true, indicating the page is a node. Otherwise, if the page kind is page, it returns false.
content/
├── books/
│ ├── book-1/
│ │ └── index.md <-- kind = page IsNode = false
│ ├── book-2.md <-- kind = page IsNode = false
│ └── _index.md <-- kind = section IsNode = true
├── tags
│ ├── fiction
│ │ └── _index.md <-- kind = term IsNode = true
│ └── _index.md <-- kind = taxonomy IsNode = true
└── _index.md <-- kind = home IsNode = true
{{ .IsNode }}