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

标签云显示不完整 #1908

Closed
3 tasks done
ziyunch opened this issue Sep 27, 2017 · 6 comments · Fixed by theme-next/hexo-theme-next#662
Closed
3 tasks done

标签云显示不完整 #1908

ziyunch opened this issue Sep 27, 2017 · 6 comments · Fixed by theme-next/hexo-theme-next#662

Comments

@ziyunch
Copy link

ziyunch commented Sep 27, 2017

I agree and want to create new issue


Expected behavior

The tags page would contain all tags in my site, which are shown in a form of tagcloud. (Total tags number is over 200)
标签页面以标签云形式显示所有标签(标签数>200)

Actual behavior

Some tags are not shown in the tagcloud, but we could still retrieve the page for the individual tag by the url (which means the process of tag generation is good).
标签云显示不完整:部分标签未显示于标签云内,但是可以通过输入地址访问(说明标签生成没有问题)

Steps to reproduce the behavior

  1. Create a page named tags
  2. Edit tags page, set page type to tags.
  3. Add tags to theme _config.yml:
  • Link to demo site with this issue: demo
  • Link(s) to source code or any usefull link(s):

In index.md file in tags folder, the content is:
在tags目录中的index.md文件内容如下:

---
title: tags
date: 2016-10-26 23:15:43
type: "tags"
comments: false
---

NexT Information

NexT Version:

[x] Latest Master branch.
[] Latest Release version.
[] Old version - 

NexT Scheme:

[] All schemes
[] Muse
[] Mist
[] Pisces
[x] Gemini

Other Information

@ivan-nginx ivan-nginx added the Bug label Sep 27, 2017
@ivan-nginx
Copy link
Collaborator

ivan-nginx commented Sep 27, 2017

Confirmed. If tagcloud have many tags, pagination is not adding.

@ivan-nginx
Copy link
Collaborator

ivan-nginx commented Sep 29, 2017

@ziyunch ok, i find this and it's actually not a bug and maybe performance option.

For tag cloud generation, tagcloud (tagcloud.js) helper used by NexT theme in page.swig file.

And as we can see, in tagcloud default amount of tags — 40
And in NexT page.swig value is set to 200:

{{ tagcloud({min_font: 12, max_font: 30, amount: 200, color: true, start_color: '#ccc', end_color: '#111'}) }}

Can u test it for play around with amount: 200 option? Set to 0 or to 300 and see what happening.
I think need to add option to this amount or add pagination. Mb need to add fragment_cache too. What u think, how will be better?

But always remember about performance. Here is talking about speed generating and tagcloud helper figured there. Can u tell me how many seconds/minutes your blog generate is spending with ~400 posts and ~200 tags in NexT?

ivan-nginx added a commit that referenced this issue Sep 29, 2017
Temporary solution for #1908.
@ivan-nginx
Copy link
Collaborator

Added temporary solution in de271c1.

@ivan-nginx ivan-nginx modified the milestones: v5.1.3, v5.1.4 Sep 29, 2017
@ziyunch
Copy link
Author

ziyunch commented Oct 25, 2017

@ivan-nginx It works now, thanks.

By the way, it took 3.91 s to load and 50 s to generate all the files.

wafer-li pushed a commit to wafer-li/hexo-theme-next that referenced this issue Dec 29, 2017
@ivan-nginx ivan-nginx modified the milestones: v5.1.4, v5.1.5 Dec 31, 2017
@ivan-nginx
Copy link
Collaborator

Added cache option to increase generation speed in NexT v6.0.0.

@ivan-nginx
Copy link
Collaborator

Fixed in #662 pull.

@ivan-nginx ivan-nginx removed this from the v5.1.5 milestone Mar 7, 2019
Repository owner locked as resolved and limited conversation to collaborators Mar 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants