From ceef3905795b418fee3bdb908f022135411d5314 Mon Sep 17 00:00:00 2001 From: zzossig Date: Wed, 10 Jun 2020 13:03:41 +0900 Subject: [PATCH] [new config param] minItemsToShowInTagCloud fix #242 --- README.ko.md | 1 + README.md | 1 + layouts/partials/taxonomy/taxonomy-categories.html | 3 ++- layouts/partials/taxonomy/taxonomy-series.html | 3 ++- layouts/partials/taxonomy/taxonomy-tags.html | 3 ++- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.ko.md b/README.ko.md index 3283841..cb189ad 100644 --- a/README.ko.md +++ b/README.ko.md @@ -245,6 +245,7 @@ enablePinnedPosts = true # show pinned posts first in the main view viewportSize = "normal" # widest, wider, wide, normal, narrow enableUiAnimation = true hideSingleContentsWhenJSDisabled = false +minItemsToShowInTagCloud = 1 # Minimum items to show in tag cloud # header homeHeaderType = "text" # text, img, slide diff --git a/README.md b/README.md index 9a39719..c0755a1 100644 --- a/README.md +++ b/README.md @@ -245,6 +245,7 @@ enablePinnedPosts = true # show pinned posts first in the main view viewportSize = "normal" # widest, wider, wide, normal, narrow enableUiAnimation = true hideSingleContentsWhenJSDisabled = false +minItemsToShowInTagCloud = 1 # Minimum items to show in tag cloud # header homeHeaderType = "text" # text, img, slide diff --git a/layouts/partials/taxonomy/taxonomy-categories.html b/layouts/partials/taxonomy/taxonomy-categories.html index e55ef46..1d9d8ad 100644 --- a/layouts/partials/taxonomy/taxonomy-categories.html +++ b/layouts/partials/taxonomy/taxonomy-categories.html @@ -6,8 +6,9 @@ {{ i18n "categories" }} + {{ $minItemsToShowInTagCloud := $.Site.Params.minItemsToShowInTagCloud }} {{ range $index, $element := .Site.Taxonomies.categories }} - {{ if $index }} + {{ if and $index (ge (len $element) $minItemsToShowInTagCloud) }} diff --git a/layouts/partials/taxonomy/taxonomy-series.html b/layouts/partials/taxonomy/taxonomy-series.html index b740a31..757a80f 100644 --- a/layouts/partials/taxonomy/taxonomy-series.html +++ b/layouts/partials/taxonomy/taxonomy-series.html @@ -6,8 +6,9 @@ {{ i18n "series" }} + {{ $minItemsToShowInTagCloud := $.Site.Params.minItemsToShowInTagCloud }} {{ range $index, $element := .Site.Taxonomies.series }} - {{ if $index }} + {{ if and $index (ge (len $element) $minItemsToShowInTagCloud) }} diff --git a/layouts/partials/taxonomy/taxonomy-tags.html b/layouts/partials/taxonomy/taxonomy-tags.html index 03434f8..2e00518 100644 --- a/layouts/partials/taxonomy/taxonomy-tags.html +++ b/layouts/partials/taxonomy/taxonomy-tags.html @@ -6,8 +6,9 @@ {{ i18n "tags"}} + {{ $minItemsToShowInTagCloud := $.Site.Params.minItemsToShowInTagCloud }} {{ range $index, $element := .Site.Taxonomies.tags }} - {{ if $index }} + {{ if and $index (ge (len $element) $minItemsToShowInTagCloud) }}