Eq

在這個構造的範例中,我們列出了當前區段中的所有頁面,並排除了當前頁面。

{{ $currentPage := . }}
{{ range .CurrentSection.Pages  }}
  {{ if not (.Eq $currentPage) }}
    <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
  {{ end }}
{{ end }}