0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/test/unit
Rosco Kalis 301e1b2419 🎨Improved image counting for the {{reading_time}} helper (#9366)
refs #9200

- We have not yet counted the images within your html, this commit counts images based on the this algorithm: https://blog.medium.com/read-time-and-you-bc2048ab620c
- Added imageCount utility, which counts images using an img-tag regex, amended from the general tag-regex found in wordCount
- Added this imageCount to the {{reading_time}} helper, adding 12 seconds to the reading time for every image
- The feature image is still counted as before
- The first image adds 12 seconds, the second 11, the third 10, and so on
- Images from the tenth onwards add 3 seconds to the reading time
2018-03-05 09:30:15 +01:00
..
adapters Use Promise support which was added in fs-extra 3.x 2017-12-13 20:57:11 +01:00
api Proper error handling for permissible implementations 2018-02-21 16:59:48 +01:00
apps Moved default-cards app to lib/mobiledoc (#9341) 2017-12-14 14:44:01 +00:00
config fix(config): cleanup absolute path config function (#8641) 2017-07-06 00:04:18 +02:00
controllers Moved labs, auth, permissions, settings, mail, themes to services (#9339) 2017-12-14 03:01:23 +01:00
data Improved validation layer (#9427) 2018-02-16 00:49:15 +01:00
helpers 🎨Improved image counting for the {{reading_time}} helper (#9366) 2018-03-05 09:30:15 +01:00
lib Added lib.security.password lib 2018-02-15 21:13:04 +01:00
models 🐛Fixed image properties to be reset to null after removal (#9432) 2018-03-05 09:10:27 +01:00
public Tidy up unit test files (#9340) 2017-12-14 03:36:50 +01:00
services Sorted out the mixed usages of include and withRelated (#9425) 2018-02-15 10:53:53 +01:00
web Extended ghost version utility (#9278) 2018-01-03 20:20:18 +01:00
filters_spec.js Tidy up unit test files (#9340) 2017-12-14 03:36:50 +01:00