0%

hexo-next 设置首页和归档页的分页数量

首先需要安装下面两个插件 (第一个是首页,第二个是归档页)

1
2
npm install --save hexo-generator-index
npm install --save hexo-generator-archive

接着去 hexo 项目目录下的 _config.yml 文件找到并且设置下面配置

1
2
3
4
5
6
7
8
9
10
11
# 首页分页
index_generator:
path: ''
per_page: 5 # 一页 5 篇
order_by: -date

# 归档页面 分页
archive_generator:
per_page: 50 # 一页 50 篇
yearly: true
monthly: true

即设置完成了哈