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

github.com/gevhaz/hugo-theme-notrack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon <gevhaz@tutanota.com>2020-05-26 23:11:05 +0300
committerSimon <gevhaz@tutanota.com>2020-05-26 23:11:05 +0300
commit67b19929cbe34b0a5596609e4fb654b26e8ee8c7 (patch)
tree5c1a960fe8c7f9027cccc9030d89aeb7836adef9 /layouts
parent3fef324f9bd1e1ea849c915f6a4933c49a4b9586 (diff)
Generalized blog taxonomy links so other names for tags and categories
work.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/list.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 388bae9..8b4bb0a 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -6,6 +6,7 @@
{{ if default true .Site.Params.showTaxonomyLinks }}
<div class="taxonomy-links">
<ul>
+ {{- /* code for figuring out where to archives page is, if anywhere */ -}}
{{ $archivesExists := false }}
{{ $archivesPageTitle := "" }}
{{ $archivesPagePermalink := "" }}
@@ -21,8 +22,12 @@
{{ if $archivesExists }}
<li><a href="{{ $archivesPagePermalink }}">{{ default "Archives" $archivesPageTitle }}</a></li>
{{ end }}
- <li><a href="{{ "categories" | absURL }}">Categories</a></li>
- <li><a href="{{ "tags" | absURL }}">Tags</a></li>
+
+ {{ range $taxonomyName, $taxonomy := .Site.Taxonomies }}
+ {{ if or (in $taxonomyName "categ") (in $taxonomyName "tag") }}
+ <li><a href="{{ $taxonomyName | absURL }}">{{ $taxonomyName }}</a></li>
+ {{ end }}
+ {{ end }}
</ul>
</div>
{{ end }}