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

hexo-pagination

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-pagination

Pagination utilities for Hexo generator plugins.

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

hexo-pagination

Build Status NPM version Coverage Status

Pagination utilities for Hexo generator plugins.

Installation

$ npm install hexo-pagination --save

Usage

pagination(base, posts, [options])

OptionDescriptionDefault
perPagePosts displayed per page10
formatURL formatpage/%d/
layoutLayout. This value can be a string or an array.['archive', 'index']
dataExtra data

For example:

var pagination = require('hexo-pagination');

pagination('/tags/hexo', [], {
  perPage: 10,
  format: 'page/%d/',
  layout: ['archive', 'index'],
  data: {
    tag: 'hexo'
  }
});

This function returns an array containing objects with 3 properties: path, layout, data.

Data | Description --- | --- | --- base | Base URL total | Total pages current | Current page number current_url | Path of the current page (which equals to path) posts | The slice of posts for the current page prev | Previous page number prev_link | The path to the previous page next | Next page number next_link | The path to the next page

License

MIT

Keywords

FAQs

Package last updated on 29 Dec 2014

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