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

github.com/mattbutton/silhouette-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt <kendoran@gmail.com>2019-08-20 12:43:01 +0300
committerMatt <kendoran@gmail.com>2019-08-20 12:43:01 +0300
commitc1b4e06297ec6a3c348964742a3710de89f1b6f3 (patch)
tree753fae6c4d24f5f5a12ef1a91c8fa8da07524916
parente4f82b4b2f16c1571f1848563583fbb83ab13696 (diff)
Post count not appears correctly for category and tags taxonomies
-rw-r--r--layouts/_default/list.html29
1 files changed, 16 insertions, 13 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index fc29341..04bef9a 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -50,23 +50,26 @@
<div class="feature-image-text">
<h1 class="text-center">{{ .Title }}</h1>
- {{ $title := urlize .Title }}
- {{ with .Site.Taxonomies.categories }}
- {{ range $name, $taxonomy := . }}
- {{ $term := urlize $name }}
- {{ if eq $term $title }}
- A {{ $taxonomy.Count }}-post collection
+ {{ if eq .Type "categories" }}
+ {{ $title := urlize .Title }}
+ {{ with .Site.Taxonomies.categories }}
+ {{ range $name, $taxonomy := . }}
+ {{ $term := urlize $name }}
+ {{ if eq $term $title }}
+ A {{ $taxonomy.Count }}-post collection
+ {{ end }}
{{ end }}
{{ end }}
{{ end }}
-
- {{ $title := urlize .Title }}
- {{ with .Site.Taxonomies.tags }}
- {{ range $name, $taxonomy := . }}
- {{ $term := urlize $name }}
- {{ if eq $term $title }}
- A {{ $taxonomy.Count }}-post collection
+ {{ if eq .Type "tags" }}
+ {{ $title := urlize .Title }}
+ {{ with .Site.Taxonomies.tags }}
+ {{ range $name, $taxonomy := . }}
+ {{ $term := urlize $name }}
+ {{ if eq $term $title }}
+ A {{ $taxonomy.Count }}-post collection
+ {{ end }}
{{ end }}
{{ end }}
{{ end }}