[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
enableUiAnimation = true
hideSingleContentsWhenJSDisabled = false
minItemsToShowInTagCloud = 1 # Minimum items to show in tag cloud
# header
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
enableUiAnimation = true
hideSingleContentsWhenJSDisabled = false
minItemsToShowInTagCloud = 1 # Minimum items to show in tag cloud
# header
homeHeaderType = "text" # text, img, slide

View File

@ -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">

View File

@ -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">

View File

@ -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">