@vuepress/plugin-pagination

pagination plugin

Install

yarn add -D @vuepress/plugin-pagination
# OR npm install -D @vuepress/plugin-pagination

Usage

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

Options

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