Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dldx/hpstr-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Rose <est.michael@gmail.com>2015-11-24 00:07:43 +0300
committerMichael Rose <est.michael@gmail.com>2015-11-24 00:07:43 +0300
commit297fdb14e1974b7b6d34bfcf74efe34ac9b1cad1 (patch)
treeea706b0f43f9f0d611ed9dad69005003b45edee1
parent6b82d76fddc0d57a28754932b291c5656b0af9f8 (diff)
parent5484ceb4d067e0454ec1574b214c25d74c7b5d0a (diff)
Merge branch 'sjm/word-count-without-html' of https://github.com/smaclell/hpstr-jekyll-theme into smaclell-sjm/word-count-without-html
-rw-r--r--_layouts/post.html2
-rw-r--r--index.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/_layouts/post.html b/_layouts/post.html
index 57a238d..44e6ea8 100644
--- a/_layouts/post.html
+++ b/_layouts/post.html
@@ -34,7 +34,7 @@
{% if site.reading_time %}
<p class="entry-reading-time">
<i class="fa fa-clock-o"></i>
- {% assign readtime = content | number_of_words | divided_by:site.words_per_minute %}
+ {% assign readtime = content | strip_html | number_of_words | divided_by:site.words_per_minute %}
Reading time ~{% if readtime <= 1 %}1 minute{% else %}{{ readtime }} minutes{% endif %}
</p><!-- /.entry-reading-time -->
{% endif %}
diff --git a/index.html b/index.html
index e8e59df..8aef27b 100644
--- a/index.html
+++ b/index.html
@@ -23,7 +23,7 @@ image:
{% if site.reading_time %}
<span class="entry-reading-time">
<i class="fa fa-clock-o"></i>
- {% assign readtime = post.content | number_of_words | divided_by:site.words_per_minute %}
+ {% assign readtime = post.content | strip_html | number_of_words | divided_by:site.words_per_minute %}
Reading time ~{% if readtime <= 1 %}1 minute{% else %}{{ readtime }} minutes{% endif %}
</span><!-- /.entry-reading-time -->
{% endif %}