This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 1,000,000+ packages pre-installed, including
hexo-generator-index with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
Index generator for Hexo.
It generates an archive of posts on your homepage, according to the
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
config.per_pageas specified in the official Hexo docs (if present), otherwise
awesome-pagemakes the URL ends with 'awesome-page/
sticky parameter in the post 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.
--- title: Hello World date: 2013/7/13 20:46:25 sticky: 100 ---
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