blob: 719d36262054183e8581e731f7e9135183c1a7eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{{ $scratch := newScratch }}
{{ $scratch.Delete "custom" }}
{{ range $name, $value := .taxo }}
{{ $scratch.Add "custom" (slice (dict "Name" $name "Value" $value "Num" (len $value))) }}
{{ end }}
{{ range sort ($scratch.Get "custom") ".Num" "desc" }}
{{ $taxaTypeName := .Name }}
<h3>
{{ $taxaTypeName | humanize }}
</h3>
{{ $this_taxa := index $.taxo .Name }}
<div class="taxa-container home-page-card">
{{ range $this_taxa.ByCount }}
{{ $taxaValueName := .Page.Title }}
<a class="taxa" href="{{ .Page.Permalink }}" aria-label="site taxonomies">{{ .Page.Title }}</a>
{{ end }}
</div>
{{ end }}
|