🔀 Merge pull request #326 from mhulse/feature/taxonomy-flag-list

 Independent control of taxonomy display on list AND single pages
This commit is contained in:
James Panther
2022-11-08 09:51:03 +11:00
committed by GitHub
4 changed files with 26 additions and 20 deletions
+4 -1
View File
@@ -46,7 +46,10 @@
</div>
{{/* Output taxonomies */}}
{{ if .Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false) }}
{{ if or
(and (ne $scope "single") (.Params.showTaxonomies | default (.Site.Params.list.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false))))
(and (eq $scope "single") (.Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false)))
}}
<div class="my-1 text-xs text-neutral-500 dark:text-neutral-400 ">
{{ range $taxonomy, $terms := .Site.Taxonomies }}
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}