blob: 3485c4b5aaadddb06921e988e4bac62bfc0fcc84 (
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 }}
<h4 style="margin: 0;">
{{ $taxaTypeName | humanize }}
</h4>
{{ $this_taxa := index $.taxo .Name }}
<div class="taxa-container">
{{ range $this_taxa.ByCount }}
{{ $taxaValueName := .Page.Title }}
<a class="taxa" href="{{ .Page.Permalink }}">{{ .Page.Title }}</a>
{{ end }}
</div>
{{ end }}
|