{"_id":"@chavesweb/vuepress-plugin-pagination","_rev":"1-dc5b328fcb9234450129493b901a7520","name":"@chavesweb/vuepress-plugin-pagination","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@chavesweb/vuepress-plugin-pagination","version":"1.0.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"description":"pagination plugin for vuepress theme yubisaki","keywords":["vuepress","vuepress-plugin"],"repository":{"type":"git","url":"git+https://github.com/Yubisaki/vuepress-plugin-pagination.git"},"bugs":{"url":"https://github.com/Yubisaki/vuepress-plugin-pagination/issues"},"homepage":"https://github.com/Yubisaki/vuepress-plugin-pagination#readme","main":"index.js","author":{"name":"子肃","email":"stickmyc@163.com"},"license":"MIT","scripts":{"release":"release-it"},"devDependencies":{"conventional-changelog-cli":"^2.0.5","release-it":"^7.6.1"},"_id":"@chavesweb/vuepress-plugin-pagination@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"chavesgu","email":"mail@chavesgu.com"},"dist":{"integrity":"sha512-+x8OQyztvxoMbwe/k2acobM2RUYZHKA7Dnmd33lPx+pzcHyML5lXvZohJcFLO48hbfWcy282Js7ZxZygjLf4Ow==","shasum":"a528bcab66f790f9df842bac18605681fc9fb223","tarball":"https://registry.npmjs.org/@chavesweb/vuepress-plugin-pagination/-/vuepress-plugin-pagination-1.0.1.tgz","fileCount":6,"unpackedSize":6945,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdehECRA9TVsSAnZWagAAO+wP/0zGRyMA27TK2ItqtZbB\nayoUq8+TUdgaJllZv04p/DPSIu53dUxjSP4hvEcmQi8H0PnaLGOhuTHH8wDT\nbYik8+tlezv6c5oIUEFMbrEAlSfNj8YytrkhK2WlHocx22/ZDYzeJtwBO3as\nI25QvTbIFPmE1gshoKrfqYscMBsiw6le0vVn8/81H0sAtsCpNpxfq1HXomAr\nwoWUVbmL7sZ1Wz70nOdm6OZtaSKSyoEoc9GN45vrL0dj1smtdmaaz/LRYzQS\n/rT2DEZEcdfreG4PT6eIslUd7G7WjkRhyHmK6gQwI6u5W//gWi+XecIA6oj1\nUZrXpQYeWjJ9TAlfRHS0MpE5zQZy2k3UiZvnjvmEpz8LwBCAJEBGvEUOjn6D\n2t96hjb9n1wAN03aDMQzTzU184CASvuzR3lKnOpS0xmPD8iyztnoGa6B39Xd\nqYgvR7cV6RZCVzA9R3o0WsOZJ35BRoH0Jgs73zJuxPG/OfqE+EaS6zemarlR\n5Y7OTAqPX2iXHURSnxA9sIl4PANtq7rOC6k9/W+I4ACynFD5uBCGILWW3R+F\naRL5pcZvWtRBKvhHSQfV3Wjl/uK60KlVomXJkZowjiBjrx8zNu5UtSzoDJNO\nvC9cvIHBib2YYRJcjwLCHGfu4cURb6YnnyR6O42vuenVtBNs9DaMYfwA3x8d\nIjS5\r\n=+PsC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCy68jH/fXpKXTfEhA1UnumS9eQMOo7XyQrzLvQ756n9QIhAN9fRiZfbLSjsvD4pt+UCBTXuWq2j+l2J9hE+i9QKx8+"}]},"maintainers":[{"name":"chavesgu","email":"mail@chavesgu.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vuepress-plugin-pagination_1.0.1_1551231043760_0.5251784259903227"},"_hasShrinkwrap":false}},"time":{"created":"2019-02-27T01:30:43.577Z","1.0.1":"2019-02-27T01:30:43.878Z","modified":"2022-04-04T22:34:22.560Z"},"maintainers":[{"name":"chavesgu","email":"mail@chavesgu.com"}],"description":"pagination plugin for vuepress theme yubisaki","homepage":"https://github.com/Yubisaki/vuepress-plugin-pagination#readme","keywords":["vuepress","vuepress-plugin"],"repository":{"type":"git","url":"git+https://github.com/Yubisaki/vuepress-plugin-pagination.git"},"author":{"name":"子肃","email":"stickmyc@163.com"},"bugs":{"url":"https://github.com/Yubisaki/vuepress-plugin-pagination/issues"},"license":"MIT","readme":"# @yubisaki/vuepress-plugin-pagination\n\n## Install\n\n```bash\nnpm i @yubisaki/vuepress-plugin-pagination\n```\n\n## Usage\n\n```js\nmodule.exports = {\n  plugins: ['@yubisaki/vuepress-plugin-pagination']\n}\n```\n\n## Options\n\n**postsFilter**\n- Type: `function`  \n\n- default: \n\n```js\n(pageContext) => pageContext.type === 'post'\n```\n\nThis function is used to filter pages, the default value filter the pages which type is post\n\n**postsSorter**\n- Type: `function`\n\n- default:\n\n```js\n(prev, next) => {\n  const prevTime = new Date(prev.frontmatter.date).getTime()\n  const nextTime = new Date(next.frontmatter.date).getTime()\n  return prevTime - nextTime > 0 ? -1 : 1\n}\n```\n\nThis function is used to sort pages, the default value is to sort pages by `page.frontmatter.date`\n\n**perPagePosts**\n- Type: `number`\n\n- default: `5`\n\nThis option is the count of posts which per page will show\n\n**paginationDir**\n- Type: `string`\n\n- default: `page`\n\nThis option is the pagination path, such as `xxx.blog/page/1`, `xxx.blog/page/2`\n\n**firstPagePath**\n- Type: `string`\n\n- default: `/`\n\nThis option is the first pagination path, equivalent to `xxx.blog/page/1`\n\n**layout**\n- Type: `string`\n\n- default: `Layout`\n\nThis option is the layout wich pagination page will be used\n\n## example\n\n```js\nmodule.exports = {\n  plugins: ['@yubisaki/pagination', {\n    postsFilter,\n    postsSorter,\n    perPagePosts,\n    paginationDir,\n    firstPagePath,\n    layout\n  }]\n}\n```\n\n## What can you get?\n\n`Vue.computed.$pagination`: The property support pagination data\n\n`$pagination` has the below property:\n\n- `all`: All pages\n\n- `pages`: The Array of pagination\n\n- `length` The length of the `pages` property\n\n- `currentIndex`: The current page index\n\n- `posts`: The posts of the current page \n\n- `hasPrev`: If the current post has previous post\n\n- `hashNext`: If the current post has next post\n\n- `prevLink`: The link of the previous page\n\n- `nextLink`: The link of the next page","readmeFilename":"README.md"}