云盘
志元云盘
备份云盘
Home
/
志元云盘
/
webdav
/
hexo
/
hexo-blog
/
node_modules
/
hexo-generator-index
File
OriginalPic
Thumbnails
CopyAllDownloadUrl
EditTime
Size
lib
2024-01-09 18:36:00
569 B
index.js
2023-11-13 01:33:43
288 B
LICENSE
2023-11-13 01:33:43
1.03 KB
package.json
2023-11-13 01:33:43
861 B
README.md
2023-11-13 01:33:43
1.96 KB
# hexo-generator-index [](https://github.com/hexojs/hexo-generator-index/actions?query=workflow%3ATester) [](https://www.npmjs.com/package/hexo-generator-index) [](https://coveralls.io/r/hexojs/hexo-generator-index?branch=master) Index generator for [Hexo]. It generates an archive of posts on your homepage, according to the `index` or `archive` layout of your theme. ## Installation ``` bash $ npm install hexo-generator-index --save ``` ## Options Add or modify the following section to your root _config.yml file ``` yaml 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`](https://hexo.io/docs/configuration.html#Pagination) as specified in the official Hexo docs (if present), otherwise `10` - `0` disables pagination - **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. ## Usage The `sticky` parameter in the post [Front-matter](https://hexo.io/docs/front-matter) will be used to pin the post to the top of the index page. Higher `sticky` means that it will be ranked first. ```yml --- title: Hello World date: 2013/7/13 20:46:25 sticky: 100 --- ``` ## Note 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](https://github.com/hexojs/hexo-generator-archive) to generate an archive according to the `archive` layout. ## License MIT [Hexo]: https://hexo.io/
2025-08-29 16:32:58 Friday 216.73.216.167 Runningtime:0.054s Mem:1.48 MB