0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/test
Aileen Nowak dbd22d7447 Feature: {{reading_time}} theme helper (#9217)
closes #9200

- Registered new server helper `{{reading_time}}`.
- Added new global util `word-count` based on the util in Ghost admin, which returns the number of words in an HTML string.
- Based on the word count of the post html, the helper calculated the estimated reading time:
   - 275 words per minute
   - additional 12 seconds when post has feature image
- Renders a string like 'x min red', unless reading time is less than a minute. In this case, the rendered string is '< 1 min read'.
2017-11-06 18:40:07 +00:00
..
functional Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
integration Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
unit Feature: {{reading_time}} theme helper (#9217) 2017-11-06 18:40:07 +00:00
utils ESlint rule: no-multiple-empty-lines 2017-11-06 10:12:18 +00:00
.eslintrc.json ESlint rule: no-multiple-empty-lines 2017-11-06 10:12:18 +00:00
.jshintrc