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

首页分页和归档分页不同是如何做到的? #30

Closed
lurpis opened this issue Mar 6, 2015 · 4 comments
Closed

首页分页和归档分页不同是如何做到的? #30

lurpis opened this issue Mar 6, 2015 · 4 comments
Labels

Comments

@lurpis
Copy link
Contributor

lurpis commented Mar 6, 2015

你好,很喜欢你的主题,现在我也在使用,
不过稍微做了点改动,请海涵!
我的博客
看到你的blog的首页为展示5篇文章/页,而归档页展示为20篇文章/页
请问是在config里配置还是在代码里实现的?

谢谢!

@iissnan
Copy link
Owner

iissnan commented Mar 6, 2015

没关系。我也正在着手在 NexT 基础上做一个紧凑的版本,跟你的有点类似。

不同的分页设置需要 Hexo 3 版本,通过 npm i --save 以下 plugin:

然后在站点的 _config.yml 中设置,例如:

index_generator:
  per_page: 5

archive_generator:
  per_page: 20
  yearly: true
  monthly: true

tag_generator:
  per_page: 10

@lurpis
Copy link
Contributor Author

lurpis commented Mar 6, 2015

好了,解决了

十分感谢!:)

@jeekwong
Copy link

Nice

@tara1128
Copy link

tara1128 commented Nov 1, 2016

So cool. I am doing my blog using Hexo, too. Since my articles are growing, I am planning to make pagination to my index page. This is helpful. Thank you!~

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

No branches or pull requests

4 participants