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

github.com/shaform/hugo-theme-den.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaform <shaform@gmail.com>2018-07-18 12:57:17 +0300
committerShaform <shaform@gmail.com>2018-07-18 12:57:17 +0300
commitd34dd0c325d5afcd2467864edb02df90444bcbea (patch)
tree5dac8631438b7e43d06685ab792814891da74f4c /layouts
parentd5cf6d108310b088fdc6acb84414af9e5332b215 (diff)
support `preserveTaxonomyNames = false`
Diffstat (limited to 'layouts')
-rw-r--r--layouts/posts/single.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
index dcf4d06..aec11a2 100644
--- a/layouts/posts/single.html
+++ b/layouts/posts/single.html
@@ -18,7 +18,7 @@
/ {{ i18n "in_category" }}
{{ range . -}}
{{- $name := . -}}
- {{- with $.Site.GetPage "taxonomy" "categories" $name -}}
+ {{- with $.Site.GetPage "taxonomy" "categories" $name | default ($.Site.GetPage "taxonomy" "categories" ($name | urlize)) -}}
{{- if not ($.Scratch.Get "firstcategory") -}}
,
{{ else -}}
@@ -37,7 +37,7 @@
<i class="fas fa-tags" aria-hidden="true"></i>
{{ range (. | sort) -}}
{{- $name := . -}}
- {{- with $.Site.GetPage "taxonomy" "tags" $name -}}
+ {{- with $.Site.GetPage "taxonomy" "tags" $name | default ($.Site.GetPage "taxonomy" "tags" ($name | urlize)) -}}
{{- if not ($.Scratch.Get "firsttag") -}}
,
{{ else -}}