Files
vuepress/packages/@vuepress/plugin-pagination
2018-10-10 14:02:56 +08:00
..
2018-09-27 13:33:31 +08:00
2018-09-29 02:00:29 +08:00
2018-10-10 14:02:56 +08:00

@vuepress/plugin-pagination

pagination plugin for vuepress

Usage

module.exports = {
  plugins: ['@vuepress/pagination'] 
}

postsFilter

  • Type: function
  • Default:
(({ type }) => type === 'post')`

postsSorter

  • Type: function
  • Default:
((prev, next) => {
  const prevTime = new Date(prev.frontmatter.date).getTime()
  const nextTime = new Date(next.frontmatter.date).getTime()
  return prevTime - nextTime > 0 ? -1 : 1
})