mirror of
https://github.com/TrezOne/congo-hindi-gujarati.git
synced 2026-07-01 04:21:55 -04:00
✨ Add taxonomies on article and list pages
This commit is contained in:
@@ -40,4 +40,21 @@
|
||||
<span class="pl-2">{{ partial "badge.html" (i18n "article.draft" | emojify) }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{/* Output taxonomies */}}
|
||||
{{ if .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) }}
|
||||
{{ range $context.GetTerms $taxonomy }}
|
||||
<a
|
||||
href="{{ .RelPermalink }}"
|
||||
class="px-1 py-[1px] border rounded-md border-neutral-200 dark:border-neutral-600 hover:border-primary-300 hover:text-primary-700 dark:hover:border-primary-600 dark:hover:text-primary-400"
|
||||
>{{ .LinkTitle }}</a
|
||||
>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user