Add read time script

This is a bugfix for the story layout
This commit is contained in:
Gergely Polonkai 2018-09-21 17:48:36 +02:00
parent f123b01463
commit a0822eb344
1 changed files with 4 additions and 0 deletions

4
_includes/read_time.html Normal file
View File

@ -0,0 +1,4 @@
<span class="reading time" title="Estimated reading time">
{% assign words = content | number_of_words %}
{% if words < 360 %}1 minute{% else %}{{ words | divided_by:180 }} minutes{% endif %} read
</span>