jekyll-time-to-read 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-time-to-read.rb +1 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d6787672f85f16288bab35985e04163bd1eaec9
|
4
|
+
data.tar.gz: 0b1ce5a13709c74d1610790f0b003ea3e5c823c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86ea41fe47156c6be6c45b2f8a68a6e1252e9ab78d0cbcb6e93337ac6cc70931d881e3a07b0ace0acb0b70e2c6526f41fbccd03800e36cd6dc3ec8b006b091bb
|
7
|
+
data.tar.gz: 8775f9512dec87714b9e42cf6b6315521181af6089ab663fc301a92ebedb21c18dc8ea8ead6898d9b9ad0fc6236a0cf053688d4dc596ad469b01e4f64964f27f
|
data/lib/jekyll-time-to-read.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# Outputs the reading time, as a number
|
2
2
|
|
3
3
|
# Read this in "about 4 minutes"
|
4
|
-
# Put into your _plugins dir in your Jekyll site
|
5
4
|
# Usage: Read this in {{ page.content | reading_time_as_i }}
|
6
5
|
|
7
6
|
WORD_PER_MINUTE = 180
|
@@ -25,7 +24,6 @@ end
|
|
25
24
|
# Outputs the reading time, as a string
|
26
25
|
|
27
26
|
# Read this in "about four minutes"
|
28
|
-
# Put into your _plugins dir in your Jekyll site
|
29
27
|
# Usage: Read this in {{ page.content | reading_time_as_s }}
|
30
28
|
|
31
29
|
module ReadingTimeFilterAsString
|
@@ -33,7 +31,6 @@ module ReadingTimeFilterAsString
|
|
33
31
|
minutes, minutes_label = calculate_time(input)
|
34
32
|
|
35
33
|
case minutes
|
36
|
-
when 1 then minutes_s = 'one'
|
37
34
|
when 2 then minutes_s = 'two'
|
38
35
|
when 3 then minutes_s = 'three'
|
39
36
|
when 4 then minutes_s = 'four'
|
@@ -42,6 +39,7 @@ module ReadingTimeFilterAsString
|
|
42
39
|
when 7 then minutes_s = 'seven'
|
43
40
|
when 8 then minutes_s = 'eight'
|
44
41
|
when 9 then minutes_s = 'nine'
|
42
|
+
else minutes_s = minutes
|
45
43
|
end
|
46
44
|
|
47
45
|
minutes > 0 ? "#{minutes_s} #{minutes_label}" : "less than one minute"
|