hexo-generator-index
Index generator for Hexo.
Last updated 2 years ago by yoshinorin .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install hexo-generator-index 
SYNC missed versions from official npm registry.

hexo-generator-index

Build Status NPM version Coverage Status

Index generator for Hexo.

It generates an archive of posts on your homepage, according to the index or archive layout of your theme.

Installation

npm install hexo-generator-index --save

Options

Add or modify the following section to your root _config.yml file.

index_generator:
  path: ""
  per_page: 10
  order_by: -date
  pagination_dir: page
  layout: ["index", "archive"]
  • 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), otherwise 10
    • 0 disables pagination.
  • order_by: Posts order.
    • default: -date (date descending)
  • pagination_dir: URL format.
    • default: page
    • e.g. set awesome-page makes the URL ends with awesome-page/<page number> for second page and beyond.
  • layout: custom layout.
    • defalut: ["index", "archive"]

Usage

The 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
---

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 to generate an archive according to the archive layout.

License

MIT

Current Tags

  • 4.0.0                                ...           latest (2 years ago)

12 Versions

  • 4.0.0                                ...           2 years ago
  • 3.0.0                                ...           4 years ago
  • 2.0.0                                ...           6 years ago
  • 1.0.0                                ...           7 years ago
  • 0.2.1                                ...           10 years ago
  • 0.2.0                                ...           11 years ago
  • 0.1.3                                ...           11 years ago
  • 0.1.2                                ...           12 years ago
  • 0.1.1                                ...           12 years ago
  • 0.1.0                                ...           12 years ago
  • 0.0.2                                ...           12 years ago
  • 0.0.1                                ...           12 years ago
Downloads
Total 49
Today 0
This Week 0
This Month 31
Last Day 0
Last Week 21
Last Month 18
Dependencies (1)
Dev Dependencies (6)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE