All Projects → hexojs → hexo-pagination

hexojs / hexo-pagination

Licence: MIT license
Pagination utilities for Hexo generator plugins.

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to hexo-pagination

hexo-leancloud-counter-security
A plugin to fix a serious security bug in leancloud visitor counter for NexT.
Stars: ✭ 31 (+72.22%)
Mutual labels:  hexo
hexo-theme-miracle
🎉 A clean and lightweight single-column theme for Hexo.
Stars: ✭ 50 (+177.78%)
Mutual labels:  hexo
action-hexo
No description or website provided.
Stars: ✭ 28 (+55.56%)
Mutual labels:  hexo
hexo-theme-kaze
⛵ A responsive, modern Hexo theme
Stars: ✭ 172 (+855.56%)
Mutual labels:  hexo
hexo-tag-instagram
Embed instagram photo and movie tag plugin for Hexo.
Stars: ✭ 23 (+27.78%)
Mutual labels:  hexo
oalieno.github.io
oalieno.github.io/
Stars: ✭ 22 (+22.22%)
Mutual labels:  hexo
hexo-theme-mip
Hexo MIP 模板
Stars: ✭ 15 (-16.67%)
Mutual labels:  hexo
hexo-theme-concise
A beautiful and simple theme for hexo
Stars: ✭ 18 (+0%)
Mutual labels:  hexo
hexo-generator-searchdb
Seach data generator plugin for Hexo.
Stars: ✭ 44 (+144.44%)
Mutual labels:  hexo
butterfly-plugins
No description or website provided.
Stars: ✭ 36 (+100%)
Mutual labels:  hexo
hexo-douban-card
在hexo文章中插入豆瓣读书,豆瓣电影,豆瓣音乐组件
Stars: ✭ 56 (+211.11%)
Mutual labels:  hexo
houko
xiaomo's blog,please star if you like ✨-share technology and study record,about life。https://blog.xiaomo.info (personal share)
Stars: ✭ 3 (-83.33%)
Mutual labels:  hexo
hexo-theme-minima
An undoubtedly simple and lightweight dark/light theme for Hexo.js
Stars: ✭ 161 (+794.44%)
Mutual labels:  hexo
blog
«Pinlyu» – Leirock's Blog
Stars: ✭ 34 (+88.89%)
Mutual labels:  hexo
peach-blog
🍑 a blog based on flask
Stars: ✭ 55 (+205.56%)
Mutual labels:  hexo
blog
Source code of my blog
Stars: ✭ 64 (+255.56%)
Mutual labels:  hexo
hornhuang.github.io
🚀This is my personal homepage, it my honor to show yours my interstind life, best wishes to your ~
Stars: ✭ 12 (-33.33%)
Mutual labels:  hexo
hexo-theme-amber
🎉 A bootstrap blog theme for hexo
Stars: ✭ 47 (+161.11%)
Mutual labels:  hexo
hexo-directory-category
Automatically add category to Hexo article according to the article file directory.
Stars: ✭ 35 (+94.44%)
Mutual labels:  hexo
hexo-bilibili-bangumi
hexo 番剧页面插件,可选数据源:Bilibili, Bangumi
Stars: ✭ 252 (+1300%)
Mutual labels:  hexo

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])

Option Description Default
perPage Posts displayed per page 10
format URL format page/%d/
layout Layout. This value can be a string or an array. ['archive', 'index']
data Extra 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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].