Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zzossig/hugo-theme-zzo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzzossig <zzossig@gmail.com>2020-06-10 07:03:41 +0300
committerzzossig <zzossig@gmail.com>2020-06-10 07:03:41 +0300
commitceef3905795b418fee3bdb908f022135411d5314 (patch)
treec5149299e2ae74a82464a767aaee1aad8a604397
parent19551c536f01eb31a226b0717967b1591b2f2134 (diff)
[new config param] minItemsToShowInTagCloud
fix #242
-rw-r--r--README.ko.md1
-rw-r--r--README.md1
-rw-r--r--layouts/partials/taxonomy/taxonomy-categories.html3
-rw-r--r--layouts/partials/taxonomy/taxonomy-series.html3
-rw-r--r--layouts/partials/taxonomy/taxonomy-tags.html3
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" }}
</a>
</span>
+ {{ $minItemsToShowInTagCloud := $.Site.Params.minItemsToShowInTagCloud }}
{{ range $index, $element := .Site.Taxonomies.categories }}
- {{ if $index }}
+ {{ if and $index (ge (len $element) $minItemsToShowInTagCloud) }}
<span class="tag">
<a href="{{ $element.Page.RelPermalink }}" class="is-categories taxo__link" data-dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}">
<span class="taxo__text">
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" }}
</a>
</span>
+ {{ $minItemsToShowInTagCloud := $.Site.Params.minItemsToShowInTagCloud }}
{{ range $index, $element := .Site.Taxonomies.series }}
- {{ if $index }}
+ {{ if and $index (ge (len $element) $minItemsToShowInTagCloud) }}
<span class="tag">
<a href="{{ $element.Page.RelPermalink }}" class="is-series taxo__link" data-dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}">
<span class="taxo__text">
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"}}
</a>
</span>
+ {{ $minItemsToShowInTagCloud := $.Site.Params.minItemsToShowInTagCloud }}
{{ range $index, $element := .Site.Taxonomies.tags }}
- {{ if $index }}
+ {{ if and $index (ge (len $element) $minItemsToShowInTagCloud) }}
<span class="tag">
<a href="{{ $element.Page.RelPermalink }}" class="is-tags taxo__link" data-dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}">
<span class="taxo__text">