hugo/docs/content/en/methods/taxonomy/Page.md
2024-06-21 09:41:24 +02:00

507 B

title description categories keywords action
Page Returns the taxonomy page or nil if the taxonomy has no terms.
related returnType signatures
page.Page
TAXONOMY.Page

{{< new-in 0.125.0 >}}

This TAXONOMY method returns nil if the taxonomy has no terms, so you must code defensively:

{{ with .Site.Taxonomies.tags.Page }}
  <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{ end }}

This is rendered to:

<a href="/tags/">Tags</a>