Created
January 7, 2014 06:36
-
-
Save hguochen/8295469 to your computer and use it in GitHub Desktop.
Jekyll plugin - word_count minute read
This file contains hidden or 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
| {% capture words %} | |
| {{ post.content | number_of_words | divided_by:180 }} | |
| {% endcapture %} | |
| {% assign word_count = words | times: 1 %} | |
| {% if word_count != 0 %} | |
| <span>{{ word_count }} minute read</span> | |
| {% else %} | |
| <span>less than {{ word_count | plus: 1 }} minute read</span> | |
| {% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment