{{ define "keywords" }}
  {{ $p :=  split (trim .RelPermalink "/") "/"  }}
  {{ if eq (len $p) 1 }}
    <div class="coretitle"><span class="supt">{{ index $p 0 }}⁄</span>All</div>
    {{ range $taxonomyname, $taxonomy := .Site.Taxonomies }}
      {{ range $key, $value := $taxonomy }}
        <span> <a href="/{{ index $p 0 }}/{{ $key }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $key }}</a>({{ len (index $.Site.Taxonomies.keywords $key) }})</span>
      {{ end }}
    {{ end }}
  {{ else }}
    <div class="coretitle"><span class="supt">{{ index $p 0 }}⁄</span>{{ index $p 1 }}</div>
    {{ range .Pages  }}
        <li><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></li>
    {{  end }}
  {{ end }}
{{ end }}
