diff --git a/_includes/article.html b/_includes/article.html index f4bbf4f..f8a1bfe 100755 --- a/_includes/article.html +++ b/_includes/article.html @@ -33,6 +33,11 @@

{{ post.description }}

{% endif %} +
+ + {% include reading-time.html %} +
+ \ No newline at end of file diff --git a/_includes/reading-time.html b/_includes/reading-time.html new file mode 100644 index 0000000..84224f8 --- /dev/null +++ b/_includes/reading-time.html @@ -0,0 +1,6 @@ +{% capture words %} +{{ content | number_of_words | minus: 180 }} +{% endcapture %} +{% unless words contains '-' %} +{{ words | plus: 150 | divided_by: 150 | append: ' minutes to read' }} +{% endunless %} \ No newline at end of file diff --git a/_layouts/post.html b/_layouts/post.html index 57db5bc..1e9098b 100755 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -5,7 +5,7 @@
- + {% if page.video_embed %}
@@ -25,11 +25,11 @@ {%endif %} {% endif %} - + {% if page.video_embed %} {% assign videoInfo = 'post__info-video' %} {% endif %}
@@ -97,7 +98,7 @@

{{ page.title | escape }}

- {% include disqus-comments.html %} + {% include disqus-comments.html %}