jekyll-algolia 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/algolia/hooks.rb +12 -2
- data/lib/jekyll/algolia/version.rb +1 -1
- 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: 8b6433c0b94ecdcff87f99aba83da0f0e6c69acb
|
4
|
+
data.tar.gz: 23846665446cae0927cb5a4677a80c82b31fb0f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed9c134b992afb611c0e2116e2be5ceff53aea8280ed93d5e1673a3bac958b3b745118df4d2116d33e1836b535c5d42da25c67c753f3bd4a5a9180a1aea5c167
|
7
|
+
data.tar.gz: 7c3cfffce318208ccf088d0af1448c96020970329cbe7b0d27105dbcd619ae07cf1b4cc96fabc05ff93b812637a778a8a0197125442d3824798d48277dab7cbf
|
data/lib/jekyll/algolia/hooks.rb
CHANGED
@@ -12,7 +12,12 @@ module Jekyll
|
|
12
12
|
# record - The hash of the record to be pushed
|
13
13
|
# node - The Nokogiri node of the element
|
14
14
|
def self.apply_each(record, node, context)
|
15
|
-
before_indexing_each
|
15
|
+
case method(:before_indexing_each).arity
|
16
|
+
when 2
|
17
|
+
before_indexing_each(record, node)
|
18
|
+
else
|
19
|
+
before_indexing_each(record, node, context)
|
20
|
+
end
|
16
21
|
end
|
17
22
|
|
18
23
|
# Public: Apply the before_indexing_all hook to all records.
|
@@ -22,7 +27,12 @@ module Jekyll
|
|
22
27
|
#
|
23
28
|
# records - The list of all records to be indexed
|
24
29
|
def self.apply_all(records, context)
|
25
|
-
before_indexing_all
|
30
|
+
case method(:before_indexing_all).arity
|
31
|
+
when 1
|
32
|
+
before_indexing_all(records)
|
33
|
+
else
|
34
|
+
before_indexing_all(records, context)
|
35
|
+
end
|
26
36
|
end
|
27
37
|
|
28
38
|
# Public: Check if the file should be indexed or not
|