Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hexo-generator-index

Package Overview
Dependencies
Maintainers
8
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-generator-index

Index generator for Hexo.

  • 4.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22K
increased by2.36%
Maintainers
8
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 09 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc