Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed the less than 1 min reading time clause #9573

Merged
merged 2 commits into from
Apr 18, 2018
Merged

Removed the less than 1 min reading time clause #9573

merged 2 commits into from
Apr 18, 2018

Conversation

rkalis
Copy link
Contributor

@rkalis rkalis commented Apr 16, 2018

closes #9569

  • Removed the less than 1 minute reading time clause, effectively making 1 min the minimum reading time
  • Removed the 'seconds' option for i18n strings, which contained the less than one minute display string
  • Kept the other i18n string options the same
  • Amended and improved tests for new functionality

closes #9569
- Removed the less than 1 minute reading time clause, effectively making 1 min the minimum reading time
- Removed the 'seconds' option for i18n strings, which contained the less than one minute display string
- Kept the other i18n string options the same
- Amended and improved tests for new functionality
@@ -48,11 +47,9 @@ module.exports = function reading_time(options) {// eslint-disable-line camelcas
readingTimeSeconds += Math.max(i, 3);
}

readingTimeMinutes = Math.round(readingTimeSeconds / 60);
readingTimeMinutes = Math.max(Math.round(readingTimeSeconds / 60), 1);

This comment was marked as abuse.

This comment was marked as abuse.

Copy link
Member

@aileen aileen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested successfully, also with translated themes that still use seconds in the {{reading_time}} helper. 👍

@aileen aileen merged commit 2a4d759 into TryGhost:master Apr 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Reading time helper
3 participants