order tags a-to-z

This commit is contained in:
zwbetz 2019-08-24 13:09:26 -05:00
parent f924417a5d
commit bf90b1e4da
1 changed files with 3 additions and 8 deletions

View File

@ -2,23 +2,18 @@
<main id="main"> <main id="main">
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
<ul class="patterns-list"> <ul class="patterns-list">
{{ $type := .Type }} {{ range .Data.Terms.Alphabetical }}
{{ range $key, $value := .Data.Terms.ByCount }}
{{ $name := .Name }}
{{ $count := .Count }}
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
<li> <li>
<h2> <h2>
<a href="{{ .Permalink }}"> <a href="{{ .Page.RelPermalink }}">
<svg class="tag-icon" aria-hidden="true" viewBox="0 0 177.16535 177.16535" focusable="false"> <svg class="tag-icon" aria-hidden="true" viewBox="0 0 177.16535 177.16535" focusable="false">
<use xlink:href="#tag"></use> <use xlink:href="#tag"></use>
</svg> </svg>
{{ printf "(%d) %s" $count $name }} {{ printf "(%d) %s" .Count .Page.Title }}
</a> </a>
</h2> </h2>
</li> </li>
{{ end }} {{ end }}
{{ end }}
</ul> </ul>
</main> </main>
{{ end }} {{ end }}