diff options
author | Vincent Tam <sere@live.hk> | 2019-08-01 01:57:41 +0300 |
---|---|---|
committer | Vincent Tam <sere@live.hk> | 2019-08-01 01:57:41 +0300 |
commit | 6819ff0c1ef96bb6918a3696d492a8e644140744 (patch) | |
tree | eec3c2055a4369936a8739ceaf3eef22493aaf13 | |
parent | c378708a7bf7113defbab96e3d2c3fecc15c224d (diff) |
Updated taxonomy template with Hugo v0.55 syntax
https://gohugo.io/templates/taxonomy-templates/#order-alphabetically-example
-rw-r--r-- | layouts/_default/terms.html | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 6c2638c..1b7e2b1 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -5,9 +5,10 @@ </h1> </header> <div class="taxonomy"> - {{ $data := .Data }} - {{- range $key, $value := .Data.Terms -}} - <a class="label label-info" href="/{{ $data.Plural }}/{{ $key | urlize }}">{{ $key }} ({{ len $value }})</a> - {{ end }} + <p> + {{ range .Data.Terms.Alphabetical -}} + <a class="label label-info" href="{{ .Page.RelPermalink }}">{{ .Page.Title }} ({{ .Count }})</a> + {{ end -}} + </p> </div> {{ end }} |