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:
authorLuke Rawlins <luke.rawlins@outlook.com>2020-09-24 03:05:01 +0300
committerLuke Rawlins <luke.rawlins@outlook.com>2020-09-24 03:05:01 +0300
commitfaf94a8cfaecf9b1af958ba6ac10362237b46a8a (patch)
tree3e08c80d168da6152e0194f081657c7e207d5873 /layouts
parent81e8120a5a5646c19ce13f71645f5e71c4c59d99 (diff)
Fix for issue 236
Added logic to layouts/blog/single.html that checks front matter to display other taxonomies.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/blog/single.html16
1 files changed, 15 insertions, 1 deletions
diff --git a/layouts/blog/single.html b/layouts/blog/single.html
index f5fadb7..4bb8e81 100644
--- a/layouts/blog/single.html
+++ b/layouts/blog/single.html
@@ -51,6 +51,20 @@
{{ end }}
</p>
{{ end }}
+ <!-- Start fix 236 -->
+ {{ range $taxonomy_term, $taxonomy := .Params }}
+ {{ with $.Site.GetPage (printf "/%s" $taxonomy_term) }}
+ <p>
+ {{ if (ne $taxonomy_term "tags") }}
+ {{ $taxonomy_term | title }}:
+ <a href="{{ .Permalink }}">{{ range $key, $value := $taxonomy }}
+ {{ $value }}</a>
+ </p>
+ {{ end }}
+ {{ end }}
+ {{ end }}
+ {{ end }}
+ <!-- End fix 236 -->
</div>
<!-- Begin blog post content -->
<div class="container markdown top-pad">
@@ -58,4 +72,4 @@
</div>
<!-- End blog post content -->
{{ partial "comments.html" . }}
-{{ end }} \ No newline at end of file
+{{ end }}