jekyll-uj-powertools 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/jekyll-uj-powertools/version.rb +1 -1
- data/lib/jekyll-uj-powertools.rb +12 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed8ff551b10df7719126d6931f80f718f824d7eb7bf3474f57ce7fabe73195da
|
4
|
+
data.tar.gz: 7c4720f0a2484fff90074d14e5c7bdb80fd334ce64e921c96dbc3593bcca0edf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6b6c32672e0e4d14b2eb6206fcf024bbc1e2b3c4edb6bd74b8e00f4270020e23065c5a088b809d31e66c2dfc006651230e07103d66b4cdcc1a0cafdf5cb36ab
|
7
|
+
data.tar.gz: 1e94402b3d7fc6e79eba0a17ef97aed9187b4854791624ab6c71389794d222b3d73f975bc7c3eaf2992d70afee02a667e28fb2136e50831b4c2476eacd9b46e2
|
data/lib/jekyll-uj-powertools.rb
CHANGED
@@ -2,6 +2,9 @@ require "jekyll"
|
|
2
2
|
|
3
3
|
module Jekyll
|
4
4
|
module UJPowertools
|
5
|
+
# Initialize a timestamp that will remain consistent across calls
|
6
|
+
@cache_timestamp = Time.now.to_i.to_s
|
7
|
+
|
5
8
|
# Strip ads from the input
|
6
9
|
def uj_strip_ads(input)
|
7
10
|
input
|
@@ -44,14 +47,22 @@ module Jekyll
|
|
44
47
|
end
|
45
48
|
|
46
49
|
# Cache buster
|
50
|
+
# def uj_cache(input)
|
51
|
+
# Time.now.to_i.to_s
|
52
|
+
# end
|
47
53
|
def uj_cache(input)
|
48
|
-
|
54
|
+
Jekyll::UJPowertools.cache_timestamp
|
49
55
|
end
|
50
56
|
|
51
57
|
# Title case
|
52
58
|
def uj_title_case(input)
|
53
59
|
input.split(' ').map(&:capitalize).join(' ')
|
54
60
|
end
|
61
|
+
|
62
|
+
# Accessor for the consistent timestamp
|
63
|
+
def self.cache_timestamp
|
64
|
+
@cache_timestamp
|
65
|
+
end
|
55
66
|
end
|
56
67
|
|
57
68
|
class InjectData < Generator
|