Eq
Reports whether two Page objects are equal.
Syntax
PAGE1.Eq PAGE2
Returns
bool
In this contrived example we list all pages in the current section except for the current page.
layouts/page.html
{{ $currentPage := . }}
{{ range .CurrentSection.Pages }}
{{ if not (.Eq $currentPage) }}
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{ end }}
{{ end }}Last updated:
July 7, 2025
:
Merge commit 'bb147f91ee9078e6a55e8c32ab4b2e5dbc5cee45' (079671b41)
Improve this page