{"_id":"@dwspace/vuepress-plugin-reading-time","name":"@dwspace/vuepress-plugin-reading-time","dist-tags":{"latest":"2.0.0-alpha.26"},"versions":{"2.0.0-alpha.26":{"name":"@dwspace/vuepress-plugin-reading-time","version":"2.0.0-alpha.26","description":"A plugin for computing word count and reading time in VuePress 2. Fork from gungnir theme","keywords":["vue","vuepress","vuepress-plugin","read","time","read time","reading time","word count","words per minute"],"homepage":"https://github.com/DWSpace/source-blog-theme/reading-time","bugs":{"url":"https://github.com/DWSpace/source-blog-theme"},"repository":{"type":"git","url":"git+https://github.com/DWSpace/source-blog-theme.git","directory":"packages/plugins/reading-time"},"license":"MIT","author":{"name":"Dat","email":"dat10165@gmail.com"},"main":"lib/node/index.js","types":"lib/node/index.d.ts","dependencies":{"@vuepress/core":"2.0.0-beta.49"},"scripts":{"build":"tsc -b tsconfig.build.json","clean":"rimraf lib *.tsbuildinfo"},"_id":"@dwspace/vuepress-plugin-reading-time@2.0.0-alpha.26","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-w50cbvtfsw+QMrLdCXj4hCVcTlRtv2HDFAIdVMII13kwdOQnaaZ+J4Y3AUf0Kw7/w+IFY3CsvqJ+2+DB+mA0Ug==","shasum":"68a7b1f209e90261e3fe887d50ab7daaa7ba6f57","tarball":"https://registry.npmjs.org/@dwspace/vuepress-plugin-reading-time/-/vuepress-plugin-reading-time-2.0.0-alpha.26.tgz","fileCount":11,"unpackedSize":10923,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWsw5mYpxw3msQ/gRRxew9Lo7e6zrPQjp5wmjsjQjLQAIgH77Zo4Cx5x2mX50LupTf5Sqm9gPDX+ONHYmqp33K6rE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVc3MACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmru7A/9H3upNyFE+he7AWGCLC6V23KUSK0oZdMNtL9wIKYYcEyGFpp2\r\nE6PNNpbgAkVugbs4QpSgx35r0/uKVg+irtGvIoBFdrHNt0OBv9EiM+uPxk3u\r\nLhTACHgitIae0Auu/H64UE2akdwGj+d1n05NQsqqMl2eJOkpi9o0YyolhKmX\r\ncaACJIX4BxjkyZA+y8xd29IO3uH0AD7j9YYVi4OnGCqLj6zMzOJDdoyo/mzS\r\nymXNpHGfYV4CfFysNbar/pK3MP0LWpEJ4/BR/2AKvI2s56eWhK6mHgMcj9DR\r\n/fKRGcgcgaHoIBs0M1PPW3rJGwe0FiaZT2xVpEAP431ISZb9pYEdBBGChb68\r\nuTiTGz/LPAPWG2akQb9WsNotVKEFQjw6scTaaoAOpQvK5WOeitcjsLrorPlR\r\n+1jVkZj2Jfis2P+MsA6bK+8jHcjIhtwYcjrJjeolky/J5nImHLObMiTNPC4K\r\nXRTuPw4vOM1IB2vsNyJ4V0vSJtCW8WfxlitvZilewjeQF4mItpdTQUYQlU1k\r\nBLH+GJ5XFx09zXMxzYPU4rh3OqbOSbr24vLM/ioNQ/BHTKAHI6GG2ZdGLzl8\r\n4+b7ytbc1byWrJxAE6sS7kDBTsYClzqplsZ2fVT6yRz839Kl/bEyJVR7jz8H\r\nJV6wFrDFNyTtASlKmpoO+ZYEyzwepQKQMKg=\r\n=IeZI\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"tqdat","email":"dat10165@gmail.com"},"directories":{},"maintainers":[{"name":"tqdat","email":"dat10165@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vuepress-plugin-reading-time_2.0.0-alpha.26_1666567628048_0.19775854767103085"},"_hasShrinkwrap":false}},"time":{"created":"2022-10-23T23:27:07.962Z","2.0.0-alpha.26":"2022-10-23T23:27:08.214Z","modified":"2022-10-23T23:27:08.360Z"},"maintainers":[{"name":"tqdat","email":"dat10165@gmail.com"}],"description":"A plugin for computing word count and reading time in VuePress 2. Fork from gungnir theme","homepage":"https://github.com/DWSpace/source-blog-theme/reading-time","keywords":["vue","vuepress","vuepress-plugin","read","time","read time","reading time","word count","words per minute"],"repository":{"type":"git","url":"git+https://github.com/DWSpace/source-blog-theme.git","directory":"packages/plugins/reading-time"},"author":{"name":"Dat","email":"dat10165@gmail.com"},"bugs":{"url":"https://github.com/DWSpace/source-blog-theme"},"license":"MIT","readme":"# @renovamen/vuepress-plugin-reading-time@next\n\n[![npm](https://img.shields.io/npm/v/@renovamen/vuepress-plugin-reading-time/next.svg?style=flat-square&logo=npm)](https://www.npmjs.com/package/@renovamen/vuepress-plugin-reading-time/v/next) [![docs](https://img.shields.io/badge/Docs-@renovamen/vuepress--plugin--reading--time-26A2FF?style=flat-square)](https://v2-vuepress-theme-gungnir.vercel.app/docs/plugins/reading-time.html) [![license](https://img.shields.io/badge/License-Apache--2.0-green?style=flat-square)](LICENSE)\n\nPlugin `@renovamen/vuepress-plugin-reading-time@next` for counting words and estimating reading time in [VuePress 2](https://v2.vuepress.vuejs.org/). Compare to other similar VuePress plugins, this plugin supports:\n\n- Setting reading speed for English and Chinese separately\n- Excluding all content inside code blocks or tex blocks\n\n[Demo](https://v2-vuepress-theme-gungnir.vercel.app/docs/plugins/reading-time.html) (see the number beside the clock icon)\n\n\n&nbsp;\n\n## Install\n\n```bash\n# pnpm\npnpm install @renovamen/vuepress-plugin-reading-time@next\n# yarn\nyarn add @renovamen/vuepress-plugin-reading-time@next\n# npm\nnpm install @renovamen/vuepress-plugin-reading-time@next\n```\n\nThen add it to your `.vuepress/config.js`:\n\n```js\nconst { readingTimePlugin } = require(\"@renovamen/vuepress-plugin-reading-time\");\n\nmodule.exports = {\n  plugins: [\n    readingTimePlugin()\n  ]\n}\n```\n\n\n&nbsp;\n\n## Usage\n\nThe `readingTime` data can be accessed by:\n\n```js\nimport { pageData } from \"@vuepress/client\";\nconsole.log(pageData.value.readingTime);\n```\n\nAn example `readingTime` data:\n\n```js\n{\n  minutes: 12,\n  words: 3500\n}\n```\n\nYou can override by specifying `readingTime` data in frontmatter\n\n```yaml\ntitle: Hello Word\nreadingTime: { minutes: 3, words: 1500 }\n```\n\n\n&nbsp;\n\n## Options\n\n### excludes\n\nExclude pages by their path via a regular expression. Will be ignored if [`includes`](#includes) is specified.\n\n- Type: `Array<string>`\n- Default: `[]`\n\nExample:\n\n```js\nplugins: [\n  readingTimePlugin({\n    excludes: [\"/docs/.*\", \"/posts/hello-word.html\"]\n  })\n]\n```\n\n### includes\n\nAn allowlist of all pages that should be computed word count and reading time for. Includes pages by their path via a regular expression. \n\nIf `includes` is specified, [`excludes`](#excludes) will be ignored.\n\n- Type: `Array<string>`\n- Default: `[]`\n\nExample:\n\n```js\nplugins: [\n  readingTimePlugin({\n    includes: [\"/docs/.*\"]\n  })\n]\n```\n\n### wordsPerMinuteCN\n\nThe number of Chinese words per minute a user can read.\n\n- Type: `int`\n- Default: `300`\n\nExample:\n\n```js\nplugins: [\n  readingTimePlugin({\n    wordsPerMinuteCN: 500\n  })\n]\n```\n\n### wordsPerMinuteEN\n\nThe number of English words per minute a user can read.\n\n- Type: `int`\n- Default: `160`\n\nExample:\n\n```js\nplugins: [\n  readingTimePlugin({\n    wordsPerMinuteEN: 200\n  })\n]\n```\n\n### excludeCodeBlock\n\nExclude all content inside code blocks or not.\n\n- Type: `boolean`\n- Default: `false`\n\nExample:\n\n```js\nplugins: [\n  readingTimePlugin({\n    excludeCodeBlock: true\n  })\n]\n```\n\n### excludeTexBlock\n\nExclude all content inside tex blocks or not.\n\n- Type: `boolean`\n- Default: `false`\n\nExample:\n\n```js\nplugins: [\n  readingTimePlugin({\n    excludeTexBlock: true\n  })\n]\n```\n\n\n&nbsp;\n\n## License\n\n[MIT](https://github.com/Renovamen/vuepress-theme-gungnir/blob/main/packages/plugins/reading-time/LICENSE)\n","readmeFilename":"README.md"}