Skip to content

Commit

Permalink
fix: zero count in tree categories page
Browse files Browse the repository at this point in the history
fixes #468
  • Loading branch information
reuixiy committed Sep 27, 2024
1 parent d523bcb commit e7a4566
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/pages/tree-categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h1 class="list-title">{{ .Title | default (.Type | title) }}</h1>

<a href="{{ .RelPermalink }}" class="category-item">{{ .LinkTitle | default .Data.Term | default $path }}</a>
{{ if $.Site.Params.displayPostsCount }}
<span class="category-count">{{ printf "(%d)" (len .Data.category) }}</span>
<span class="category-count">{{ printf "(%d)" ($.Data.Terms.Count .Data.Term) }}</span>
{{ end }}

{{ if $.Site.Params.displayPosts }}
Expand Down

0 comments on commit e7a4566

Please sign in to comment.