Index generator for Hexo.
It generates an archive of posts on your homepage, according to the index
or archive
layout of your theme.
$ npm install hexo-generator-index --save
Add or modify the following section to your root _config.yml file
index_generator:
path: ''
per_page: 10
order_by: -date
pagination_dir: page
- path: Root path for your blog's index page.
- default: ""
- per_page: Posts displayed per page.
- default:
config.per_page
as specified in the official Hexo docs (if present), otherwise10
0
disables pagination
- default:
- order_by: Posts order.
- default: date descending
- pagination_dir: URL format.
- default: 'page'
awesome-page
makes the URL ends with 'awesome-page/' for second page and beyond.
If your theme define a non-archive index
layout (e.g. About Me page), this plugin would follow that layout instead and not generate an archive. In that case, use hexo-generator-archive to generate an archive according to the archive
layout.
MIT