Skip to content

Instantly share code, notes, and snippets.

@tvdsluijs
Created February 14, 2019 06:06
Show Gist options
  • Save tvdsluijs/00356b2770dcae646b2e64d2c674911e to your computer and use it in GitHub Desktop.
Save tvdsluijs/00356b2770dcae646b2e64d2c674911e to your computer and use it in GitHub Desktop.
jekyll reading time display
<!--Put this file in your _includes folder and just call it as an include-->
<span class="time-to-read">
{% assign words = content | number_of_words %}
{% if words < 360 %}
1 min
{% else %}
{{ words | divided_by:180 }} mins
{% endif %}
</span>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment