Created
October 10, 2016 20:51
-
-
Save bruno78/37f0e42e64c92d19a7e64f970a6566dc to your computer and use it in GitHub Desktop.
READ TIME - counts the words of your post and calculates the reading time. Add this file to your _includes folder on your Jekyll website.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span class="reading-time" title="Estimated read time"> | |
{% assign words = content | number_of_words %} | |
{% if words == 180 %} | |
1 minute read | |
{% elsif words < 180 %} | |
less than 1 minute read | |
{% else %} | |
{{ words | plus:90 | divided_by:180 }} minutes read | |
{% endif %} | |
</span> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment