diff options
author | Luke Rawlins <luke.rawlins@outlook.com> | 2020-10-04 01:43:48 +0300 |
---|---|---|
committer | Luke Rawlins <luke.rawlins@outlook.com> | 2020-10-04 01:43:48 +0300 |
commit | a90171fdb15bfaae3d2cdf1ead707e57219ec116 (patch) | |
tree | 037e98087238370da6fd94dad052c696a3622261 /layouts | |
parent | 5952da59b170ee50fce57f9a5ebb938b213297c2 (diff) |
Individual taxonomies now display properly as links and the urls are routed correctly to the proper taxonomy term.
Fixes #236
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/blog/single.html | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 3aecef2..877be4b 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -43,11 +43,13 @@ </div> {{ end }} {{ range $taxonomy_term, $taxonomy := .Params }} - {{ with $.Site.GetPage (printf "/%s" $taxonomy_term) }} - <p> + {{ with $.Site.GetPage $taxonomy_term }} + {{ $len := (len $taxonomy) }} + <p> {{ $taxonomy_term | title }}: - <a href="{{ .Permalink }}">{{ range $key, $value := $taxonomy }} - {{ $value }}</a> + {{ range $key, $value := $taxonomy }} + <a href="{{ (printf "/%s/" $taxonomy_term) | relLangURL }}{{ . | urlize }}"> + {{ $value }}</a>{{ if ne (add $key 1) $len }},{{ end }} {{ end }} </p> {{ end }} |