mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-18 00:50:48 -04:00
content: Update description of IsNode method
This commit is contained in:
parent
4de8815e9d
commit
d2486ba679
@ -9,22 +9,20 @@ params:
|
|||||||
signatures: [PAGE.IsNode]
|
signatures: [PAGE.IsNode]
|
||||||
---
|
---
|
||||||
|
|
||||||
The `IsNode` method on a `Page` object returns `true` if the [page kind](g) is `home`, `section`, `taxonomy`, or `term`.
|
The `IsNode` method on a `Page` object checks if the [page kind](g) is one of the following: `home`, `section`, `taxonomy`, or `term`. If it is, the method returns `true`, indicating the page is a [node](g). Otherwise, if the page kind is page, it returns `false`.
|
||||||
|
|
||||||
It returns `false` is the page kind is `page`.
|
|
||||||
|
|
||||||
```text
|
```text
|
||||||
content/
|
content/
|
||||||
├── books/
|
├── books/
|
||||||
│ ├── book-1/
|
│ ├── book-1/
|
||||||
│ │ └── index.md <-- kind = page, node = false
|
│ │ └── index.md <-- kind = page IsNode = false
|
||||||
│ ├── book-2.md <-- kind = page, node = false
|
│ ├── book-2.md <-- kind = page IsNode = false
|
||||||
│ └── _index.md <-- kind = section, node = true
|
│ └── _index.md <-- kind = section IsNode = true
|
||||||
├── tags/
|
├── tags
|
||||||
│ ├── fiction/
|
│ ├── fiction
|
||||||
│ │ └── _index.md <-- kind = term, node = true
|
│ │ └── _index.md <-- kind = term IsNode = true
|
||||||
│ └── _index.md <-- kind = taxonomy, node = true
|
│ └── _index.md <-- kind = taxonomy IsNode = true
|
||||||
└── _index.md <-- kind = home, node = true
|
└── _index.md <-- kind = home IsNode = true
|
||||||
```
|
```
|
||||||
|
|
||||||
```go-html-template
|
```go-html-template
|
||||||
|
Loading…
x
Reference in New Issue
Block a user