Skip to content

Wrong calculation of categories / tags count #3622

@stevenjoezhang

Description

@stevenjoezhang

For BUG

See: #1502 #2925

Categories / tags of draft are displayed / counted in non-draft generate.

In hexo-theme-next, we tried to filter out the categories / tags in the draft, but this caused performance issues:
theme-next/hexo-theme-next#42
theme-next/hexo-theme-next#87

Then I found this in tagcloud.js:

// Ignore tags with zero posts
tags = tags.filter(tag => tag.length);

Can this filter be applied to this.site.tags?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions