Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/blog/single.html10
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 }}