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

[Low Priority] "指定文章显示的位置" 功能未能正常处理分页 #134

Open
ghost opened this issue Jun 15, 2022 · 3 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Jun 15, 2022

  1. 对Bug的描述:

指定文章显示的位置 功能未能正常处理分页

在使用此功能且 总文章数量>分页最低文章数量 时, pagination 依旧按照总文章数量进行分页, 仅在每个分页上对相应的文章进行了隐藏处理
此bug可导致终端用户轻易发现博客有被隐藏的文章

  1. 复现Bug的方法:

简单的演示
此Repo模拟了一个需要分页的博客, 并随机挑选了几个文章设置了 指定文章显示的位置
运行 hexo clean all && hexo g && hexo s 并访问 http://localhost:4000 即可发现此异常行为

  1. 期望的行为:

设置此功能后, 相关页面应按照隐藏后的文章列表进行分页, 每页显示的文章数量也应符合设置

  1. 运行环境(如果该Bug的产生和环境有关,例如浏览器不兼容导致):
OS: Archlinux Rolling
Node: 16.15.1
Npm: 8.12.1
Yarn: 1.22.19
Hexo-cli: 4.3.0
Hexo-theme-kratos-rebirth: 2.0.3
@ghost ghost assigned Candinya Jun 15, 2022
@Candinya
Copy link
Owner

可能暂时无解,因为 only 是一个主题自定义参数,而分页目前主题调用的是 hexo-generator-index 这个组件生成的分页数据,那边暂时没有兼容这里的这种自定义参数
(但是可以创建一个 fork 魔改一下,记到小本本上x

@Candinya Candinya added the enhancement New feature or request label Jun 15, 2022
@ArcticLampyrid ArcticLampyrid added the help wanted Extra attention is needed label Jun 15, 2022
@ghost
Copy link
Author

ghost commented Jun 15, 2022

也许可能有关的issue:
hexojs/hexo-generator-index#14
hexojs/hexo-generator-index#60
应该是要动上游模块了orz 暂时搁置(

@ArcticLampyrid
Copy link
Collaborator

ArcticLampyrid commented Jun 15, 2022

应该是要动上游模块了orz 暂时搁置(

next主题那边好像确实是自己fork了个index生成器
https://github.com/next-theme/hexo-generator-indexed/blob/9fc4c10772ef591112662035d0dd7de30ba7a38c/lib/generator.js#L9-L21

@ArcticLampyrid ArcticLampyrid removed the help wanted Extra attention is needed label Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants