jekyll-algolia 1.2.0 → 1.2.1
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/README.md +3 -4
- data/lib/jekyll-algolia.rb +1 -1
- data/lib/jekyll/algolia/extractor.rb +1 -1
- data/lib/jekyll/algolia/hooks.rb +6 -6
- data/lib/jekyll/algolia/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5b326416385ab2dc6e2d9f7fc907f2a3629e193
|
4
|
+
data.tar.gz: f081f8814d27e39d610e74828921b3737ca2e5c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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`
|
53
|
-
|
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
|
64
|
+
Once your application ID is setup, you can run the indexing by running the
|
66
65
|
following command:
|
67
66
|
|
68
67
|
```shell
|
data/lib/jekyll-algolia.rb
CHANGED
@@ -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
|
data/lib/jekyll/algolia/hooks.rb
CHANGED
@@ -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
|
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.
|
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-
|
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.
|
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.
|
26
|
+
version: 2.5.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: algoliasearch
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|