Skip read-time if it's a minute or less

I don't think the read-time is adding much value on short pages. The
reader is likely able to make a better estimation how long it would
take to read.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-10-22 16:04:06 +02:00
parent 91425c3708
commit 34a8929065
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 1 additions and 3 deletions

View File

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