simoncor.net/themes/hugo-coder/layouts/partials/terms.html
Simon Cornet 956e73d0e4
All checks were successful
Build and Publish / Build (push) Successful in 5s
Build and Publish / Deployment (push) Successful in 58s
[hugo] feat: update
2024-08-26 17:13:18 +02:00

30 lines
807 B
HTML

<section class="container taxonomy">
<header>
<h1 class="title">
<a class="title-link" href="{{ .Permalink | safeURL }}">
{{- if eq .Kind "term" -}}
{{- i18n .Data.Plural | title -}}
{{- print ": " -}}
{{- end -}}
{{- i18n (lower .Title) | default .Title | title -}}
</a>
</h1>
</header>
{{ .Content }}
<ul>
{{ $type := .Type }}
{{ range $key, $value := .Data.Terms.Alphabetical }}
{{ $name := .Name }}
{{ $count := .Count }}
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
<li>
<span class="taxonomy-element">
<a href="{{ .Permalink }}">{{ .Name }}</a>
<sup>{{ $count }}</sup>
</span>
</li>
{{ end }}
{{ end }}
</ul>
</section>