Commit f57e8538 authored by Mathieu Nivoliez's avatar Mathieu Nivoliez

Update _reading-time.liquid

parent 66382e31
{% assign reading_wpm = 200 %}
{% assign word_count = page.content | split: " " | size %}
{% assign reading_time = word_count | divided_by: 200 %}
{% assign reading_time = word_count | divided_by: reading_wpm %}
{% case reading_time %}
{% when 0 %}
{% assign phrase = "less than a minute." %}
{% when 1 %}
{% assign phrase = "about a minute." %}
{% else %}
{% else %}
{% assign phrase = " minutes." | prepend: reading_time %}
{% endcase %}
<div class="post-meta"><time pubdate="pubdate">{{ page.published_date | date: "%b %d, %Y" }} - Reading time: {{ phrase }}</time></div><br />
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment