| 1 |
--- |
| 2 |
title: IsHome |
| 3 |
description: Reports whether the given page is the home page. |
| 4 |
categories: [] |
| 5 |
keywords: [] |
| 6 |
params: |
| 7 |
functions_and_methods: |
| 8 |
returnType: bool |
| 9 |
signatures: [PAGE.IsHome] |
| 10 |
--- |
| 11 |
|
| 12 |
The `IsHome` method on a `Page` object returns `true` if the [page kind](g) is `home`. |
| 13 |
|
| 14 |
```tree |
| 15 |
content/ |
| 16 |
├── books/ |
| 17 |
│ ├── book-1/ |
| 18 |
│ │ └── index.md <-- kind = page |
| 19 |
│ ├── book-2.md <-- kind = page |
| 20 |
│ └── _index.md <-- kind = section |
| 21 |
└── _index.md <-- kind = home |
| 22 |
``` |
| 23 |
|
| 24 |
```go-html-template |
| 25 |
{{ .IsHome }} |
| 26 |
``` |