{{ define "left" }}
  {{ partial "sidebar/mainnav.html" . }}
  {{ partial "sidebar/tags.html" . }}
{{ end }}

{{ define "main" }}
  <article class="prose dark:prose-invert max-w-none">
    {{ partial "breadcrumbs.html" . }}
    <h1 class="flex items-center">
      <span class="icon-svg icon-lg pb-2"
        >{{ partialCached "icon" "tag" "tag" }}</span
      >
      <span>{{ .Title }}</span>
    </h1>
    {{ .Content }}
    <ul>
      {{ range site.Taxonomies.tags }}
        <li>
          <a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a>
          ({{ (len .Pages) }} {{ cond (gt (len .Pages) 1) "pages" "page" }})
        </li>
      {{ end }}
    </ul>
  </article>
{{ end }}
