Welcome to mirror list, hosted at ThFree Co, Russian Federation.

tags.html « partials « layouts - github.com/de-souza/hugo-flex.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 38d044630d9e1460cccfb62205e96a0a0fac5f0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{{ $taxonomy_list := slice }}

{{ range $taxonomy, $pages := site.Taxonomies }}
  {{ $taxonomy_list = $taxonomy_list | append $taxonomy_list }}
{{ end }}

{{ $taxonomy_is_used_list := apply $taxonomy_list "isset" .Params "." }}

{{ if true | in $taxonomy_is_used_list }}
  <footer>
    {{ range $taxonomy := $taxonomy_list }}
      {{ if isset $.Params $taxonomy }}
        <ul class="Tags">
          {{ range $.GetTerms $taxonomy }}
            <li class="Tags-item u-background">
              <a class="Tags-link u-clickable" href="{{ .RelPermalink }}" rel="tag">{{ .LinkTitle }}</a>
            </li>
          {{ end }}
        </ul>
      {{ end }}
    {{ end }}
  </footer>
{{ end }}