diff options
author | Simon <gevhaz@tutanota.com> | 2020-05-26 23:11:05 +0300 |
---|---|---|
committer | Simon <gevhaz@tutanota.com> | 2020-05-26 23:11:05 +0300 |
commit | 67b19929cbe34b0a5596609e4fb654b26e8ee8c7 (patch) | |
tree | 5c1a960fe8c7f9027cccc9030d89aeb7836adef9 /layouts | |
parent | 3fef324f9bd1e1ea849c915f6a4933c49a4b9586 (diff) |
Generalized blog taxonomy links so other names for tags and categories
work.
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/list.html | 9 |
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 }} |