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

不兼容 hexo-generator-index2 等覆盖 index 实现的插件 #1133

Open
3 tasks done
jiesou opened this issue Sep 16, 2024 · 0 comments
Open
3 tasks done

不兼容 hexo-generator-index2 等覆盖 index 实现的插件 #1133

jiesou opened this issue Sep 16, 2024 · 0 comments
Labels
🐛 bug Unexpected problem or unintended behavior

Comments

@jiesou
Copy link

jiesou commented Sep 16, 2024

请确认

  • 是当前最新的 Release 版本
  • 本地 hexo clean && hexo s,并且清除浏览器缓存,仍可复现
  • 已经排除是其他 Hexo 插件影响

Bug 描述

hexo-generator-index2 能实现根据自定义的规则过滤主页所展示文章的功能,而由于本主题与其都使用了 hexo.extend.generator.register('index', ...) 覆盖了 hexo 的 index 实现,所以互相不兼容,主题会将插件的功能覆盖(参考

找到主题相关的功能是这个 #869,考虑到 hexo-generator-index2 能通过规则实现更强大的效果(如指定分类的文章不在首页展示),希望主题能提供一个选项来设置是否启用主题的功能

复现步骤

该 Bug 复现步骤如下:

  1. 安装 hexo-generator-index2 并配置 per_page 为 3,无效
  2. 删除主题的 index 实现,hexo-generator-index2 的配置正常发挥作用
@jiesou jiesou added the 🐛 bug Unexpected problem or unintended behavior label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant