[bug fix] support asian languages tags in single page

This commit is contained in:
zzossig 2020-03-11 12:29:38 +09:00
parent 7b53d1da6f
commit cd19511550
2 changed files with 7 additions and 9 deletions

View File

@ -1,11 +1,9 @@
{{ $taxo := "tags" }}
<div class="single__tags caption">
{{ range $index, $value := .Param $taxo }}
{{ if and (eq $index 0) (ne (len $value) 0) }}
🏷️
{{ end }}
{{ with $.Site.GetPage (printf "/%s/%s" $taxo ($value | urlize)) }}
<li><a href="{{ .Permalink }}" class="single__tag" title="{{ $value }}">#{{ $value }}</a></li>
<ul class="single__tags caption">
{{ if .Params.tags }}
🏷️
{{ end }}
{{ range (.GetTerms "tags") }}
<li><a href="{{ .Permalink }}" class="single__tag" title="{{ .LinkTitle }}">#{{ .LinkTitle }}</a></li>
{{ end }}
</div>
</ul>

View File

@ -5,7 +5,7 @@ license = "MIT"
licenselink = "https://github.com/zzossig/hugo-theme-zzo/blob/master/LICENSE.md"
tags = ["accessible", "multilingual", "responsive", "blog", "search", "simple", "light", "dark", "mobile", "gallery", "technical", "fast", "presentation"]
features = ["accessible", "multilingual", "responsive", "grid", "sass", "search", "subtheme", "gallery", "technical", "fast", "presentation"]
min_version = "0.60.0"
min_version = "0.65.0"
[author]
name = "zzossig"