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

添加控制文章是否在首页展示的 Front-matter #864

Closed
LovelyQuantum opened this issue Oct 31, 2022 · 0 comments
Closed

添加控制文章是否在首页展示的 Front-matter #864

LovelyQuantum opened this issue Oct 31, 2022 · 0 comments
Labels
✨ enhancement New feature request

Comments

@LovelyQuantum
Copy link
Contributor

遇到的问题

写作过程中,我们常常遇见由于内容过多导致某个主题变成系列文章的情况,往往一个系列还包含5篇以上的文章,如果全部罗列在首页显然不是一个优雅的做法。

请描述该需求尝试解决的问题

私以为一个优雅的解决办法是为系列文章创建一个索引 post,在启用 category_bar 的同时为索引 post 中添加同系列每篇文章的url,首页上只展示每个系列的索引 post 即可。

请描述您认为可行的解决方案

为了改变index页的渲染策略,需要修改 hexo 的 hexo-generator-index 插件,同时在 post_fliter 处将主页文章这一分类过滤出来。

以下是首页展示过长系列的一个例子:
example

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

No branches or pull requests

2 participants