diff options
author | Matt <kendoran@gmail.com> | 2019-08-20 12:43:01 +0300 |
---|---|---|
committer | Matt <kendoran@gmail.com> | 2019-08-20 12:43:01 +0300 |
commit | c1b4e06297ec6a3c348964742a3710de89f1b6f3 (patch) | |
tree | 753fae6c4d24f5f5a12ef1a91c8fa8da07524916 | |
parent | e4f82b4b2f16c1571f1848563583fbb83ab13696 (diff) |
Post count not appears correctly for category and tags taxonomies
-rw-r--r-- | layouts/_default/list.html | 29 |
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 }} |