diff options
author | Michael Rose <est.michael@gmail.com> | 2015-12-07 16:43:34 +0300 |
---|---|---|
committer | Michael Rose <est.michael@gmail.com> | 2015-12-07 16:44:03 +0300 |
commit | f8a46160a15638d604ab1b138e8872e9c06effc9 (patch) | |
tree | b53c3f7fe1a04625536ee82d682ed21475561c08 | |
parent | 790781b7f0b2f7c938d5c8429a657ce74405c757 (diff) |
Fix read time bug on post-index.html layout
- Was incorrectly calculating read time for the index page and not each post individually
-rw-r--r-- | _includes/read-time-index.html | 2 | ||||
-rw-r--r-- | index.html | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/_includes/read-time-index.html b/_includes/read-time-index.html new file mode 100644 index 0000000..cae3406 --- /dev/null +++ b/_includes/read-time-index.html @@ -0,0 +1,2 @@ +{% 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 %}
\ No newline at end of file @@ -23,7 +23,7 @@ image: {% if site.reading_time %} <span class="entry-reading-time"> <i class="fa fa-clock-o"></i> - {% include read-time.html %} + {% include read-time-index.html %} </span><!-- /.entry-reading-time --> {% endif %} </div><!-- /.entry-meta --> |