0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00
ghost/core/server/utils
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
..
packages Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
asset-hash.js 🐛 Refresh assetHash on theme override (#7430) 2016-09-23 13:05:44 +02:00
blog-icon.js Refactor: fetch image dimensions from local file storage (#8900) 2017-09-05 14:13:22 +02:00
cached-image-size-from-url.js 🐛 Fix invalid image URLs not being cached and causing timeouts (#8986) 2017-09-12 12:53:18 +01:00
ghost-version.js Misc Middleware cleanup (#7526) 2016-10-10 21:14:32 +02:00
gravatar.js 🎨 😎 config env usages (#7929) 2017-02-03 18:25:39 +00:00
image-size.js Image Size Utility: optimised unknown request error handling (#9094) 2017-10-04 10:03:26 +01:00
index.js Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
labs.js 🐛 Added 409 DisabledFeatureError for labs features (#8890) 2017-08-15 10:50:36 +02:00
make-absolute-urls.js 🐛 Fixed internal links converting to absolute URLs (#9143) 2017-10-18 17:54:17 +01:00
markdown-converter.js Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
mobiledoc-converter.js Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
pipeline.js Pipeline util tests, clean & fix 2015-11-03 09:14:44 +00:00
read-csv.js Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
remove-open-redirect-from-url.js Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
request.js Properly return a bluebird promise (#8988) 2017-09-07 20:48:20 +07:00
sequence.js post-scheduling 2016-06-14 10:52:13 +02:00
social-urls.js Add helpers for facebook & twitter urls 2016-05-17 16:39:58 +01:00
tokens.js Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
url.js Increased URL utility coverage to 100% (#9201) 2017-11-02 20:35:58 +00:00
visibility.js Helper Proxy & single express-hbs instance (#8225) 2017-04-04 18:07:35 +02:00
word-count.js Feature: {{reading_time}} theme helper (#9217) 2017-11-06 18:40:07 +00:00
zip-folder.js 🐛 🔗 resolve symlinks before building zip (#8780) 2017-07-31 11:48:00 +04:00