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

为 post 的 Front-matter 中添加 archive 选项用于决定 post 是否在首页展示(默认仍为展示) #869

Merged
merged 1 commit into from
Mar 3, 2023

Conversation

LovelyQuantum
Copy link
Contributor

这里是 issue #864 的pull request。
写作过程中,我们常常遇见由于内容过多导致某个主题变成系列文章的情况,往往一个系列还包含5篇以上的文章,如果全部罗列在首页显然不是一个优雅的做法。
私以为一个优雅的解决办法是为系列文章创建一个索引 post,在启用 category_bar 的同时为索引 post 中添加同系列每篇文章的url,首页上只展示每个系列的索引 post 即可。为此,我重写并覆盖了 hexo 的 hexo-generator-index 插件(说是重写也就是做了几处修改),同时在 post_fliter 处将主页文章这一分类过滤出来。
考虑到兼容性,archive 默认关闭,不影响原有 post 渲染。

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.

None yet

2 participants