[new config param] minItemsToShowInTagCloud

fix #242
This commit is contained in:
zzossig 2020-06-10 13:03:41 +09:00
parent 19551c536f
commit ceef390579
5 changed files with 8 additions and 3 deletions

View File

@ -245,6 +245,7 @@ enablePinnedPosts = true # show pinned posts first in the main view
viewportSize = "normal" # widest, wider, wide, normal, narrow viewportSize = "normal" # widest, wider, wide, normal, narrow
enableUiAnimation = true enableUiAnimation = true
hideSingleContentsWhenJSDisabled = false hideSingleContentsWhenJSDisabled = false
minItemsToShowInTagCloud = 1 # Minimum items to show in tag cloud
# header # header
homeHeaderType = "text" # text, img, slide homeHeaderType = "text" # text, img, slide

View File

@ -245,6 +245,7 @@ enablePinnedPosts = true # show pinned posts first in the main view
viewportSize = "normal" # widest, wider, wide, normal, narrow viewportSize = "normal" # widest, wider, wide, normal, narrow
enableUiAnimation = true enableUiAnimation = true
hideSingleContentsWhenJSDisabled = false hideSingleContentsWhenJSDisabled = false
minItemsToShowInTagCloud = 1 # Minimum items to show in tag cloud
# header # header
homeHeaderType = "text" # text, img, slide homeHeaderType = "text" # text, img, slide

View File

@ -6,8 +6,9 @@
{{ i18n "categories" }} {{ i18n "categories" }}
</a> </a>
</span> </span>
{{ $minItemsToShowInTagCloud := $.Site.Params.minItemsToShowInTagCloud }}
{{ range $index, $element := .Site.Taxonomies.categories }} {{ range $index, $element := .Site.Taxonomies.categories }}
{{ if $index }} {{ if and $index (ge (len $element) $minItemsToShowInTagCloud) }}
<span class="tag"> <span class="tag">
<a href="{{ $element.Page.RelPermalink }}" class="is-categories taxo__link" data-dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> <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"> <span class="taxo__text">

View File

@ -6,8 +6,9 @@
{{ i18n "series" }} {{ i18n "series" }}
</a> </a>
</span> </span>
{{ $minItemsToShowInTagCloud := $.Site.Params.minItemsToShowInTagCloud }}
{{ range $index, $element := .Site.Taxonomies.series }} {{ range $index, $element := .Site.Taxonomies.series }}
{{ if $index }} {{ if and $index (ge (len $element) $minItemsToShowInTagCloud) }}
<span class="tag"> <span class="tag">
<a href="{{ $element.Page.RelPermalink }}" class="is-series taxo__link" data-dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> <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"> <span class="taxo__text">

View File

@ -6,8 +6,9 @@
{{ i18n "tags"}} {{ i18n "tags"}}
</a> </a>
</span> </span>
{{ $minItemsToShowInTagCloud := $.Site.Params.minItemsToShowInTagCloud }}
{{ range $index, $element := .Site.Taxonomies.tags }} {{ range $index, $element := .Site.Taxonomies.tags }}
{{ if $index }} {{ if and $index (ge (len $element) $minItemsToShowInTagCloud) }}
<span class="tag"> <span class="tag">
<a href="{{ $element.Page.RelPermalink }}" class="is-tags taxo__link" data-dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}"> <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"> <span class="taxo__text">