Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore categories / tags with zero posts #3624

Merged
merged 1 commit into from
Oct 4, 2019
Merged

Ignore categories / tags with zero posts #3624

merged 1 commit into from
Oct 4, 2019

Conversation

stevenjoezhang
Copy link
Member

@stevenjoezhang stevenjoezhang commented Jul 13, 2019

What does it do?

Issue resolved: #3622

Current behaviour

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.

More information:
theme-next/hexo-theme-next#42
theme-next/hexo-theme-next#87

How to test

git clone -b master https://github.com/stevenjoezhang/hexo.git
cd hexo
npm install
npm test

Screenshots

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.

@coveralls
Copy link

coveralls commented Jul 13, 2019

Coverage Status

Coverage increased (+0.06%) to 97.309% when pulling b62c13d on stevenjoezhang:master into ffe4eaa on hexojs:master.

lib/hexo/index.js Outdated Show resolved Hide resolved
@jiangtj
Copy link
Member

jiangtj commented Aug 15, 2019

@curbengh curbengh added this to the v4.0.0 milestone Sep 23, 2019
@curbengh
Copy link
Contributor

I can confirm this fixes the issue. Let's wait for #3728 first to fix failing test.

@curbengh
Copy link
Contributor

#3728 has been merged. Please rebase.

@stevenjoezhang
Copy link
Member Author

Done

@SukkaW
Copy link
Member

SukkaW commented Oct 3, 2019

Is it good to merge then?

@SukkaW SukkaW closed this Oct 3, 2019
@SukkaW SukkaW reopened this Oct 3, 2019
@SukkaW SukkaW closed this Oct 3, 2019
@SukkaW SukkaW reopened this Oct 3, 2019
@curbengh
Copy link
Contributor

curbengh commented Oct 4, 2019

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong calculation of categories / tags count
5 participants