Skip to content

Commit 2b2e6a8

Browse files
Merge pull request #56 from moldedbits/b2-add-read-timer-new-gem
add read time plugin
2 parents 44ca3e1 + 239e305 commit 2b2e6a8

File tree

6 files changed

+10
-1
lines changed

6 files changed

+10
-1
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
source 'https://rubygems.org'
22
gem 'github-pages', group: :jekyll_plugins
3+
gem 'liquid_reading_time', group: :jekyll_plugins

Gemfile.lock

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ GEM
168168
jekyll (>= 3.0)
169169
kramdown (1.13.2)
170170
liquid (4.0.0)
171+
liquid_reading_time (1.1.3)
172+
liquid (>= 2.6, < 5.0)
173+
nokogiri (~> 1.6)
171174
listen (3.0.6)
172175
rb-fsevent (>= 0.9.3)
173176
rb-inotify (>= 0.9.7)
@@ -212,6 +215,7 @@ PLATFORMS
212215

213216
DEPENDENCIES
214217
github-pages
218+
liquid_reading_time
215219

216220
BUNDLED WITH
217-
1.14.6
221+
1.15.4

_layouts/post.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ <h2 class="page-description">
3535
<header class="post-header">
3636
<section class="post-meta">
3737
<time class="post-date" datetime="{{ page.date | date:"%Y-%m-%d" }}">{{ page.date | date_to_string }}</time>
38+
, {{ content | reading_time }} min read.
3839
{% if page.categories.size > 0 %}
3940
{{ page.categories | array_to_sentence_string | prepend: 'on ' }}
4041
{% endif %}

feed.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
{% endif %}
2121
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
2222
<link>{{ site.url }}{{ post.url }}</link>
23+
<read>{{post.content | reading_time }} min</read>
2324
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
2425
</item>
2526
{% endfor %}

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ <h2 class="post-title"><a href="{{ post.url }}">{{ post.title }}</a></h2>
4949
alt="profile" nopin="nopin" />
5050
{{ author.name }}
5151
{% endif %}
52+
, {{ post.content | reading_time }} min read.
5253
{% if post.categories.size > 0 %}
5354
{{ post.categories | array_to_sentence_string | prepend: 'on ' }}
5455
{% endif %}

rss.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
{% endif %}
2121
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
2222
<link>{{ site.url }}{{ post.url }}</link>
23+
<read>{{post.content | reading_time }} min</read>
2324
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
2425
</item>
2526
{% endfor %}

0 commit comments

Comments
 (0)