gcg-website/layouts/_default/terms.html
Denys Konovalov da0484c29a
All checks were successful
website-main / prod-build (push) Successful in 44s
website-main / test-build (push) Successful in 14s
Intelligent Tags (schließt #204)
2023-10-31 20:55:16 +01:00

18 lines
686 B
HTML

{{ define "main" }}
<section class="section" data-pagefind-body>
<div class="container">
<div class="tag-list">
{{ $transliterations := site.Data.transliterations.transliterations }}
{{ range $name, $items := .Data.Terms }}
{{ if eq $.Data.Plural "tags" }}
<a href="{{ `tags/` | relURL }}{{ $name | urlize | lower }}">{{ $name }}</a>
{{ else if eq $.Data.Plural "categories" }}
<a href="{{ `categories/` | relURL }}{{ $name | urlize | lower }}">{{ if (index $transliterations $name) }}{{ index $transliterations $name }}{{ else }}{{ $name | title }}{{end}}</a>
{{ end }}
{{ end }}
</div>
</div>
</section>
{{ end }}