jekyll-algolia 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb9ad0518a59d9f4f5f1144dd0df8fe2353fa88c
4
- data.tar.gz: 2f250877aec7171e74d72bbb18853920d9c02887
3
+ metadata.gz: a5b326416385ab2dc6e2d9f7fc907f2a3629e193
4
+ data.tar.gz: f081f8814d27e39d610e74828921b3737ca2e5c1
5
5
  SHA512:
6
- metadata.gz: 2458c1300860126ad1f915cb591df1b6d764fb35808578810777f4814eb1cfe711cea28eba30d3b3334307970fa85259940fd3cc822cce024636b399bad446e4
7
- data.tar.gz: 2352c7b494c6ef70e8fa90e25c55a2ec55962abe81c7d6e690ba430a1bdfe4e1f032ea9b3a43a9bfd8eb0a90b1f60ff29b37bcd2badea3b2b13672b1067c60ca
6
+ metadata.gz: e1e02e97125a5d12c6b71f64294dcd09120e5775b678bd993440913ec7dd44095fcc81617b79b513d89b88b05242dcd79e4b19891c031674d879b20d40a555ff
7
+ data.tar.gz: c2c4a50197b52f226cd7d666390c0929af8ae6c164e0f59975968dfe782ef9f385059e7f0d96bf4de7b48059a0eeb5bc3b0dbea628fb9555ca66a5d8ab040e8e
data/README.md CHANGED
@@ -49,20 +49,19 @@ site.
49
49
  here][8]. Once signed in, you can get your
50
50
  credentials from [your dashboard][9].*
51
51
 
52
- Once you have your credentials, you should define your `application_id` and
53
- `index_name` inside your `_config.yml` file like this:
52
+ Once you have your credentials, you should define your `application_id` inside
53
+ your `_config.yml` file like this:
54
54
 
55
55
  ```yaml
56
56
  # _config.yml
57
57
 
58
58
  algolia:
59
59
  application_id: 'your_application_id'
60
- index_name: 'your_index_name'
61
60
  ```
62
61
 
63
62
  ## Run it
64
63
 
65
- Once your credentials are setup, you can run the indexing by running the
64
+ Once your application ID is setup, you can run the indexing by running the
66
65
  following command:
67
66
 
68
67
  ```shell
@@ -181,7 +181,7 @@ module Jekyll
181
181
  end
182
182
 
183
183
  # Applying the user hook on the whole list of records
184
- records = Hooks.apply_all(records)
184
+ records = Hooks.apply_all(records, self)
185
185
 
186
186
  # Adding a unique objectID to each record
187
187
  records.map! do |record|
@@ -30,7 +30,7 @@ module Jekyll
30
30
  # Apply custom user-defined hooks
31
31
  # Users can return `nil` from the hook to signal we should not index
32
32
  # such a record
33
- record = Hooks.apply_each(record, node)
33
+ record = Hooks.apply_each(record, node, Jekyll::Algolia.site)
34
34
  next if record.nil?
35
35
 
36
36
  records << record
@@ -11,8 +11,8 @@ module Jekyll
11
11
  #
12
12
  # record - The hash of the record to be pushed
13
13
  # node - The Nokogiri node of the element
14
- def self.apply_each(record, node)
15
- before_indexing_each(record, node)
14
+ def self.apply_each(record, node, context)
15
+ before_indexing_each(record, node, context)
16
16
  end
17
17
 
18
18
  # Public: Apply the before_indexing_all hook to all records.
@@ -21,8 +21,8 @@ module Jekyll
21
21
  # as they can be mocked in tests.
22
22
  #
23
23
  # records - The list of all records to be indexed
24
- def self.apply_all(records)
25
- before_indexing_all(records)
24
+ def self.apply_all(records, context)
25
+ before_indexing_all(records, context)
26
26
  end
27
27
 
28
28
  # Public: Check if the file should be indexed or not
@@ -47,7 +47,7 @@ module Jekyll
47
47
  # information from the HTML node.
48
48
  #
49
49
  # Users can return nil to signal that the record should not be indexed
50
- def self.before_indexing_each(record, _node)
50
+ def self.before_indexing_each(record, _node, _context)
51
51
  record
52
52
  end
53
53
 
@@ -59,7 +59,7 @@ module Jekyll
59
59
  # Users can modify the full list from here. It might provide an easier
60
60
  # interface than `hook_before_indexing_each` when knowing the full context
61
61
  # is necessary
62
- def self.before_indexing_all(records)
62
+ def self.before_indexing_all(records, _context)
63
63
  records
64
64
  end
65
65
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Algolia
5
- VERSION = '1.2.0'
5
+ VERSION = '1.2.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-algolia
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Carry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-20 00:00:00.000000000 Z
11
+ date: 2018-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: algolia_html_extractor
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.5.1
19
+ version: 2.5.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.5.1
26
+ version: 2.5.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: algoliasearch
29
29
  requirement: !ruby/object:Gem::Requirement