Created
March 5, 2016 15:09
-
-
Save BryanSchuetz/1e159a5259a39bd31522 to your computer and use it in GitHub Desktop.
A liquid block for generating the reading time of a given post.
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
{% capture words %} | |
{{ content | number_of_words | minus: 180 }} | |
{% endcapture %} | |
{% unless words contains “-” %} | |
{{ words | plus: 180 | divided_by: 180 | | |
append: “ minutes to read” }} | |
{% endunless %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment