diff --git a/config/_default/params.toml b/config/_default/params.toml index d8e097ea..4ade93d2 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -78,7 +78,8 @@ forgejoDefaultServer = "https://v8.next.forgejo.org" showTableOfContents = false # showRelatedContent = false # relatedContentLimit = 3 - showTaxonomies = false + showTaxonomies = false # use showTaxonomies OR showCategoryOnly, not both + showCategoryOnly = false # use showTaxonomies OR showCategoryOnly, not both showAuthorsBadges = false showWordCount = true # sharingLinks = [ "linkedin", "twitter", "bluesky", "mastodon", "reddit", "pinterest", "facebook", "email", "whatsapp", "telegram"] @@ -165,4 +166,4 @@ forgejoDefaultServer = "https://v8.next.forgejo.org" [rssnext] # feedId = "" - # userId = "" \ No newline at end of file + # userId = "" diff --git a/layouts/partials/article-meta/basic.html b/layouts/partials/article-meta/basic.html index 6bf60596..307ca0a3 100644 --- a/layouts/partials/article-meta/basic.html +++ b/layouts/partials/article-meta/basic.html @@ -96,4 +96,15 @@ {{ end }} +{{/* Output only category */}} +{{ if .Params.showCategoryOnly | default (.Site.Params.article.showCategoryOnly | default false) }} +
+ {{ range (.GetTerms "categories") }} + + {{ partial "badge.html" .LinkTitle }} + +{{ end }} +
+{{ end }} + {{ end }}