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

Revert "Avoid recalculating the number of tags and categories" #969

Merged
merged 1 commit into from
Jul 12, 2019

Conversation

jiangtj
Copy link
Member

@jiangtj jiangtj commented Jul 12, 2019

Reverts #954

In generateBefore, we can't get the count....
image

In template_locals, loop much times...
image

Revert this submit, the best way is not use _draft, and then don't calculate them, if you have many tags or categories
Maybe cache, I will try again

@jiangtj jiangtj self-assigned this Jul 12, 2019
@jiangtj jiangtj merged commit d56602e into master Jul 12, 2019
@delete-merged-branch delete-merged-branch bot deleted the revert-954-speed branch July 12, 2019 16:02
@stevenjoezhang
Copy link
Contributor

stevenjoezhang commented Jul 13, 2019

屏幕快照 2019-07-13 上午8 19 50

Do you know why this bug only appears in the first generation? Is this a Hexo bug? (about generateBefore event)

@stevenjoezhang
Copy link
Contributor

Or we just report this problem to Hexo, to let site.categories.length and site.tags.length return the correct results

@jiangtj
Copy link
Member Author

jiangtj commented Jul 13, 2019

Or we just report this problem to Hexo, to let site.categories.length and site.tags.length return the correct results

Maybe cache will work fine, I will try again.

@stevenjoezhang
Copy link
Contributor

Seems Hexo ignores these issues:
hexojs/hexo#1502
hexojs/hexo#2925

@stevenjoezhang
Copy link
Contributor

New issue opened: hexojs/hexo#3622

@ivan-nginx
Copy link
Member

Only hexo s give that bug? How about hexo g?

tongluyang pushed a commit to tongluyang/hexo-theme-next that referenced this pull request Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants