{"id":21182413,"url":"https://github.com/theme-next/hexo-symbols-count-time","last_synced_at":"2025-04-12T15:40:24.755Z","repository":{"id":26944186,"uuid":"111989287","full_name":"theme-next/hexo-symbols-count-time","owner":"theme-next","description":"Symbols count and time to read of articles for Hexo.","archived":false,"fork":false,"pushed_at":"2025-03-21T22:06:23.000Z","size":94,"stargazers_count":115,"open_issues_count":15,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-03T16:12:24.010Z","etag":null,"topics":["hexo","symbols-count","time-to-read"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theme-next.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-25T08:42:16.000Z","updated_at":"2025-03-30T00:44:12.000Z","dependencies_parsed_at":"2024-01-05T16:28:23.631Z","dependency_job_id":"262a301f-96d7-4515-9d22-79c4d43aadd3","html_url":"https://github.com/theme-next/hexo-symbols-count-time","commit_stats":{"total_commits":129,"total_committers":7,"mean_commits":"18.428571428571427","dds":0.5968992248062015,"last_synced_commit":"28f41aba0d147336c10ed5bb453064ca2cd39a15"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-next%2Fhexo-symbols-count-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-next%2Fhexo-symbols-count-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-next%2Fhexo-symbols-count-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-next%2Fhexo-symbols-count-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theme-next","download_url":"https://codeload.github.com/theme-next/hexo-symbols-count-time/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248590747,"owners_count":21129885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hexo","symbols-count","time-to-read"],"created_at":"2024-11-20T17:56:53.013Z","updated_at":"2025-04-12T15:40:24.714Z","avatar_url":"https://github.com/theme-next.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hexo-symbols-count-time\n\n[![npm-image]][npm-url]\n[![node-image]][node-url]\n[![hexo-image]][hexo-url]\n[![cover-image]][cover-url]\n[![travis-image]][travis-url]\n[![appveyor-image]][appveyor-url]\n[![lic-image]](LICENSE)\n\nSymbols count and time to read for articles in Hexo blog.\n\nBetter than [`hexo-reading-time`](https://github.com/ierhyna/hexo-reading-time) and faster than [`hexo-wordcount`](https://github.com/willin/hexo-wordcount). No external dependencies.\n\n## Installation\n\n![size-image]\n[![dm-image]][npm-url]\n[![dt-image]][npm-url]\n\n```bash\n$ npm install hexo-symbols-count-time\n```\n\n## Usage\n\nYou can set options of hexo-symbols-count-time in the **Hexo's `_config.yml`** (which locates in the root dir of your blog):\n\n```yml\nsymbols_count_time:\n  symbols: true\n  time: true\n  total_symbols: true\n  total_time: true\n  exclude_codeblock: false\n  awl: 4\n  wpm: 275\n  suffix: \"mins.\"\n```\n\nIf `symbols_count_time` option is not specified, the default parameters will be used.\n\n### Parameters\n\n* `awl` – Average Word Length (chars count in word). Default: `4`. You can check this [here](https://charactercounttool.com).\n  * CN \u0026asymp; `2`\n  * EN \u0026asymp; `5`\n  * RU \u0026asymp; `6`\n* `wpm` – Words Per Minute. Default: `275`. You can check this [here](https://wordcounter.net).\n  * Slow \u0026asymp; `200`\n  * Normal \u0026asymp; `275`\n  * Fast \u0026asymp; `350`\n* `suffix` – If time to read less then 60 minutes, added suffix as string parameter.\\\n  If not defined, `mins.` will be used as default.\n* `exclude_codeblock` – Allow to exclude all content inside code blocks for more accurate words counting.\\\n  If not defined, `false` will be used as default.\n\n**Note for Chinese users:** because in Chinese language average word length about `~1.5` and if you at most cases write posts in Chinese (without mixed English), recommended to set `awl` to `2` and `wpm` to `300`.\\\nBut if you usualy mix your posts with English, `awl` to `4` and `wpm` to `275` will be nice.\n\n### NexT theme\n\nThis plugin integrated in «NexT» and after plugin enabled in main Hexo config, you may adjust options in NexT config:\n\n```yml\nsymbols_count_time:\n  separated_meta: true\n  item_text_post: true\n  item_text_total: false\n```\n\n## Development\n\n```bash\n$ cd hexo\n$ git clone https://github.com/theme-next/hexo-symbols-count-time.git node_modules/hexo-symbols-count-time\n$ cd node_modules/hexo-symbols-count-time\n```\n\n### Tests\n\n```bash\n$ npm install mocha chai --save-dev\n$ npm test\n```\n\n### Tests with coverage\n\n```bash\n$ npm install -g nyc\n$ nyc --print both node_modules/.bin/_mocha -- test/index.js\n```\n\n### Templates\n\n#### Symbols Count\n\n```js\n{{ symbolsCount(post) }}\n```\n\n#### Symbols Time\n\n```js\n{{ symbolsTime(post) }}\n```\n\nOr with predefined parameters:\n\n```js\n{{ symbolsTime(post, awl, wpm, suffix) }}\n```\n\n#### Symbols Count Total\n\n```js\n{{ symbolsCountTotal(site) }}\n```\n\n#### Symbols Time Total\n\n```js\n{{ symbolsTimeTotal(site) }}\n```\n\nOr with predefined parameters:\n\n```js\n{{ symbolsTimeTotal(site, awl, wpm, suffix) }}\n```\n\n#### Renderers syntax\n\nSWIG / Nunjucks: `{{` `template` `}}`\\\nEJS: `\u003c%-` `template` `%\u003e`\\\nJade: `span=` `template`\n\n[npm-image]: https://img.shields.io/npm/v/hexo-symbols-count-time?style=flat-square\n[hexo-image]: https://img.shields.io/badge/hexo-%3E%3D%203.0-blue?style=flat-square\n[node-image]: https://img.shields.io/node/v/hexo-symbols-count-time?style=flat-square\n[cover-image]: https://img.shields.io/coveralls/theme-next/hexo-symbols-count-time/master?style=flat-square\n[travis-image]: https://img.shields.io/travis/theme-next/hexo-symbols-count-time/master?style=flat-square\n[appveyor-image]: https://img.shields.io/appveyor/ci/ivan-nginx/hexo-symbols-count-time/master?style=flat-square\n[lic-image]: https://img.shields.io/npm/l/hexo-symbols-count-time?style=flat-square\n\n[size-image]: https://img.shields.io/github/languages/code-size/theme-next/hexo-symbols-count-time?style=flat-square\n[dm-image]: https://img.shields.io/npm/dm/hexo-symbols-count-time?style=flat-square\n[dt-image]: https://img.shields.io/npm/dt/hexo-symbols-count-time?style=flat-square\n\n[npm-url]: https://www.npmjs.com/package/hexo-symbols-count-time\n[node-url]: https://nodejs.org/en/download/releases\n[hexo-url]: https://hexo.io\n[cover-url]: https://coveralls.io/github/theme-next/hexo-symbols-count-time?branch=master \"Coverage of Tests\"\n[travis-url]: https://travis-ci.org/theme-next/hexo-symbols-count-time?branch=master \"Travis CI [Linux]\"\n[appveyor-url]: https://ci.appveyor.com/project/ivan-nginx/hexo-symbols-count-time/branch/master \"AppVeyor [Windows]\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheme-next%2Fhexo-symbols-count-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheme-next%2Fhexo-symbols-count-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheme-next%2Fhexo-symbols-count-time/lists"}