-
Notifications
You must be signed in to change notification settings - Fork 2k
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
hide single post or posts in specific categories on the home page #385
Conversation
Here is a document of how to use this feature. Document |
@seven-steven can u add docs in English? |
@ivan-nginx |
@ivan-nginx like this: # Hide single post or posts in specific categories on the home page
# If `hide_post` is `true`, you need to add `hide: true` in your post which you want to hide on the home page.
# If you enabled the item `hide_categories`, you need just list the categories which you want to hide on the home page under the item `categories`.
hide:
hide_post: false
hide_categories:
enable: false
categories:
# - categorie1
# - categorie2 And my English is not very good actually, so is there anythig wrong in my comments? |
Yeah, pretty nice! |
@ivan-nginx |
Need to check it for speed. With many posts. It's index file and i think will slowing down during generate site with ~500 posts or more. Please, need to test it. |
I'll try to make it better, thanks for your advice. |
Any progress you've already made? I'm happy to help with this issue. |
@seven-steven Another problem, the changes in |
emmmm... that's all what I want todo. Do you have other ideas? |
@seven-steven Use
And you can update |
@stevenjoezhang |
@seven-steven how you think, it is better will be use Another variant to fix pagination – add filter from this PR to pagination directly? Anyway, for now we have problem with slow generation for many posts, which i will fix it today. And after this fix i'll check and compare your changes too. |
@ivan-nginx |
@seven-steven same plugin can be created just under the NexT in this path: |
@ivan-nginx
To be honest, I am neither familiar with the Complete architecture of next nor javascript language. To fix the paginate by script, I need some time to learn all these things. It could take a time, really sorry about this. That's all. Thanks. |
07f52f2
to
bb5cfe6
Compare
666aa6e
to
e699386
Compare
How about only hide posts with |
Why it's needed, can u explain? |
Emm.. maybe a hexo plugin would be better. Speeding up the generating process is more important |
Yes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, here is generators what provide same functionality if needed:
hexo-generator-index2
hexo-index-anything
hexo-generator-index-plus
@seven-steven Thanks for your contributing. I'll fork Try this plugin: https://github.com/stevenjoezhang/hexo-generator-indexed npm remove hexo-generator-index
npm install hexo-generator-indexed |
@stevenjoezhang Thanks a lot. |
|
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Hide single post or posts in specific categories on the home page.
Issue Number(s): #385
What is the new behavior?
Hide single post or posts in specific categories on the home page.
Screens with this changes:
emmmmmmm......
I think screens can't show this feature well, what I did is just hide some posts on the home page.
Link to demo site with this changes: Seven's blog
How to use?
In NexT
_config.yml
:Does this PR introduce a breaking change?