HUGO
Menu
GitHub 90597 stars Mastodon

reflect.IsPage

Reports whether the given value is a Page object.
Syntax
reflect.IsPage INPUT
Returns
bool
New in v0.154.0

Usage

The reflect.IsPage function reports whether the given value is a Page object.

Examples

layouts/page.html
{{ with site.GetPage "/examples" }}
  {{ reflect.IsPage . }} → true
{{ end }}

{{ with site }}
  {{ reflect.IsPage . }} → false
{{ end }}