mirror of https://github.com/jpanther/congo.git
✨ Independent control of taxonomy display on list AND single pages
Sensible defaults: `.Params` will trump article and list `showTaxonomies` settings.pull/326/head
parent
cc5807bde0
commit
4b318084bc
|
@ -52,6 +52,7 @@ enableCodeCopy = false
|
|||
showSummary = false
|
||||
showTableOfContents = false
|
||||
groupByYear = true
|
||||
showTaxonomies = false
|
||||
|
||||
[sitemap]
|
||||
excludedKinds = ["taxonomy", "term"]
|
||||
|
|
|
@ -52,6 +52,7 @@ mainSections = ["samples"]
|
|||
showSummary = false
|
||||
showTableOfContents = true
|
||||
groupByYear = false
|
||||
showTaxonomies = false
|
||||
|
||||
[sitemap]
|
||||
excludedKinds = ["taxonomy", "term"]
|
||||
|
|
|
@ -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) }}
|
||||
|
|
Loading…
Reference in New Issue