HUGO
Menu
GitHub 90597 stars Mastodon

reflect.IsSite

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

Usage

The reflect.IsSite function reports whether the given value is a Site object.

Examples

layouts/page.html
{{ with site }}
  {{ reflect.IsSite . }} → true
{{ end }}

{{ with site.GetPage "/examples" }}
  {{ reflect.IsSite . }} → false
{{ end }}