mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-11-14 23:19:21 +00:00
Fixed custom taxonomies not appearing as badges
This commit is contained in:
1 file changed
+11
-5
@@ -100,20 +100,26 @@
|
|||||||
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
{{ range $taxonomy, $terms := .Site.Taxonomies }}
|
||||||
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
|
||||||
{{ range $context.GetTerms $taxonomy }}
|
{{ range $context.GetTerms $taxonomy }}
|
||||||
{{ if .Params.showCategories | default (.Site.Params.article.showCategories | default true) }}
|
{{ if (or (eq $taxonomy "authors") (eq $taxonomy "series"))}}
|
||||||
{{ if (eq $taxonomy "categories") }}
|
{{/* Ignore authors and series, since they are handled in other places */}}
|
||||||
|
{{ continue }}
|
||||||
|
{{ else if (eq $taxonomy "categories") }}
|
||||||
|
{{ if .Params.showCategories | default (.Site.Params.article.showCategories | default true) }}
|
||||||
<a class="relative mt-[0.5rem] me-2" href="{{ .RelPermalink }}">
|
<a class="relative mt-[0.5rem] me-2" href="{{ .RelPermalink }}">
|
||||||
{{ $useSecondaryColor := .Params.showCategoriesInSecondaryColor | default (.Site.Params.article.showCategoriesInSecondaryColor | default false) }}
|
{{ $useSecondaryColor := .Params.showCategoriesInSecondaryColor | default (.Site.Params.article.showCategoriesInSecondaryColor | default false) }}
|
||||||
{{ partial "badge.html" (dict "linkTitle" .LinkTitle "useSecondaryColor" $useSecondaryColor) }}
|
{{ partial "badge.html" (dict "linkTitle" .LinkTitle "useSecondaryColor" $useSecondaryColor) }}
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ else if (eq $taxonomy "tags") }}
|
||||||
{{ if .Params.showTags | default (.Site.Params.article.showTags | default true) }}
|
{{ if .Params.showTags | default (.Site.Params.article.showTags | default true) }}
|
||||||
{{ if (eq $taxonomy "tags") }}
|
|
||||||
<a class="relative mt-[0.5rem] me-2" href="{{ .RelPermalink }}">
|
<a class="relative mt-[0.5rem] me-2" href="{{ .RelPermalink }}">
|
||||||
{{ partial "badge.html" .LinkTitle }}
|
{{ partial "badge.html" .LinkTitle }}
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
<a class="relative mt-[0.5rem] me-2" href="{{ .RelPermalink }}">
|
||||||
|
{{ partial "badge.html" .LinkTitle }}
|
||||||
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
Reference in new issue
Block a user