{"name":"hexo-pagination","version":"1.0.0-rc1","keywords":["hexo","pagination","util"],"author":{"url":"http://zespia.tw","name":"Tommy Chen","email":"tommy351@gmail.com"},"license":"MIT","_id":"hexo-pagination@1.0.0-rc1","maintainers":[{"name":"abnerchou","email":"hi@abnerchou.me"},{"name":"curben","email":"bushedge@protonmail.com"},{"name":"ertrzyiks","email":"mateusz.derks@gmail.com"},{"name":"hexobot","email":"hexojs@gmail.com"},{"name":"jlhwung","email":"i@jhuang.me"},{"name":"tomap","email":"piartt@gmail.com"},{"name":"tommy351","email":"tommy351@gmail.com"},{"name":"yoshinorin","email":"nayo-msoft@outlook.jp"}],"homepage":"http://hexo.io/","bugs":{"url":"https://github.com/hexojs/hexo-pagination/issues"},"dist":{"shasum":"ab7706bc402e25a59293fcdbddca4059a8e86d2f","tarball":"http://registry-npm.ywwl.com/hexo-pagination/download/hexo-pagination-1.0.0-rc1.tgz","fileCount":4,"integrity":"sha512-4U+LJNoAHMcs2i7kAoeBo+sPP02GEQsayRBcbx0h5yKGMesrUQiqMXmxQjASQdV8j1rOGeNgXyJD8LDEdFOjNQ==","signatures":[{"sig":"MEYCIQDbb9jqFV6Sw2ryKP/S4IudNIZT7OSvfFdLR/xxjGAITgIhAJefU/NJxx4M/v12Y/2+5aM5GZlX+zZVr55hNNFpgABW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVDsPCRA9TVsSAnZWagAA7P4P/AiE3V2TkJp8WXtr6m5Q\nyzr8Mx3Y9CeTuWcQIs/n4syzl+jcmlUawK5pt/WaoDOJlnDW4rWEvbTohROl\n70vOed9YqJW+u4AqK5FVsWB/7806tK1e8uNQUKYi/11dFR3i5NKLx1Pxiob1\nPTlJtNRnggsOG9RaQzGuL+3KuFGd+W6tQsAcugPF5XpPFgdki2u5bJ023ixL\nzWqljzIW1WZgHOd2Hr1qFu0kCAvPXAo53DrDIF6UqyLz5YFElmgn7Hz8s5Lw\nvwfbDVsHPhUGk7tjFFkcS4V81lCgwYpx08dpYbB6+sqv5MJvR2A7hIA3Jcmu\njcKsyT/2CQvBWvcLQaXZ0ZqSHdpM+bd7+yKPzw63IdeOiBK8+Q+hQZBQ62nw\n7xiW/IsOuZp8TzSjH1mP+KRLZc02hVTIiJORNgM41fbwMMRGctTQl1Nb7w/x\naTM8NL3hpNz3ympPXQBjjPf63FqyfMdbxrVlo/87YxPebUtlfi1H/I0gXIT+\n/xIewwWoifc47mBamFfPwgBN//Rn21sWRwxyDunUUC1IymMC3m72Zf9XC9w0\nM49HKN0+O6K3g2rVFg7vvS2jNNFPiu+BFVXYoiR4VlDsChsPQn1J99BXMZI5\nqpNyp3v2YyLhjgAeyEJ6MhRjWZSYOTvGeA5fwNh5lyR+rvYi9HVS4VPNyt+q\nJIu6\r\n=Uk0n\r\n-----END PGP SIGNATURE-----\r\n","size":2459,"noattachment":false,"key":"/hexo-pagination/-/hexo-pagination-1.0.0-rc1.tgz"},"main":"lib/pagination","engines":{"node":">=8.6.0"},"gitHead":"3f763d59eb410dcc055eac542edc2e0a6c5dd886","scripts":{"test":"mocha test/index.js","eslint":"eslint .","test-cov":"nyc npm run test"},"_npmUser":{"name":"tomap","email":"piartt@gmail.com"},"repository":{"url":"git+https://github.com/hexojs/hexo-pagination.git","type":"git"},"_npmVersion":"6.9.0","description":"Pagination utilities for Hexo generator plugins.","directories":{"lib":"./lib"},"_nodeVersion":"12.8.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^4.1.2","mocha":"^6.0.2","eslint":"^6.0.1","eslint-config-hexo":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hexo-pagination_1.0.0-rc1_1565801230630_0.9514420442716167","host":"s3://npm-registry-packages"},"readme":"# hexo-pagination\n\n[![Build Status](https://github.com/hexojs/hexo-pagination/workflows/Tester/badge.svg)](https://github.com/hexojs/hexo-pagination/actions?query=workflow%3ATester)\n[![NPM version](https://badge.fury.io/js/hexo-pagination.svg)](https://www.npmjs.com/package/hexo-pagination)\n[![Coverage Status](https://img.shields.io/coveralls/hexojs/hexo-pagination.svg)](https://coveralls.io/r/hexojs/hexo-pagination?branch=master)\n\nPagination utilities for [Hexo] generator plugins.\n\n## Installation\n\n```bash\n$ npm install hexo-pagination --save\n```\n\n## Usage\n\n### pagination(base, posts, [options])\n\n| Option           | Description                                     | Default                |\n| ---------------- | ----------------------------------------------- | ---------------------- |\n| `perPage`        | Posts displayed per page                        | `10`                   |\n| `format`         | URL format                                      | `page/%d/`             |\n| `layout`         | Layout. This value can be a string or an array. | `['archive', 'index']` |\n| `data`           | Extra data                                      | `{}`                   |\n| `explicitPaging` | Number the first page. e.g. `page/1/index.html` | `false`                |\n\nFor example:\n\n```js\nvar pagination = require(\"hexo-pagination\");\n\npagination(\"/tags/hexo\", [], {\n  perPage: 10,\n  format: \"page/%d/\",\n  layout: [\"archive\", \"index\"],\n  data: {\n    tag: \"hexo\",\n  },\n});\n```\n\nThis function returns an array containing objects with 3 properties: `path`, `layout`, `data`.\n\n| Data          | Description                                       |\n| ------------- | ------------------------------------------------- |\n| `base`        | Base URL                                          |\n| `total`       | Total pages                                       |\n| `current`     | Current page number                               |\n| `current_url` | Path of the current page (which equals to `path`) |\n| `posts`       | The slice of posts for the current page           |\n| `prev`        | Previous page number                              |\n| `prev_link`   | The path to the previous page                     |\n| `next`        | Next page number                                  |\n| `next_link`   | The path to the next page                         |\n\n## License\n\nMIT\n\n[Hexo]: https://hexo.io/\n","publish_time":1565801230758,"_cnpm_publish_time":1565801230758,"dist-tags":{"latest":"4.0.0","next":"1.0.0-rc1"}}