jekyll-algolia 1.4.9 → 1.7.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/README.md +3 -1
- data/lib/jekyll/algolia/configurator.rb +7 -5
- data/lib/jekyll/algolia/file_browser.rb +0 -2
- data/lib/jekyll/algolia/indexer.rb +6 -4
- data/lib/jekyll/algolia/version.rb +1 -1
- data/lib/jekyll/commands/algolia.rb +7 -0
- metadata +20 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e25f44ea863e7df956f7629ec0ef140576f01166f1dc1db15c4592d8131e517
|
4
|
+
data.tar.gz: 4c01bab60fb28d44ef99520c5f622991590d1a17311ac4957c01674fb3d6261c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8807f6ff30a1d02cdcccdfcfb2a39631880930777ab2ceb10bb1e4115d820b1846ccadd67c69195e2c12bdf4c6787519f6441133f8bd868da423b37e584d8ff
|
7
|
+
data.tar.gz: cd55421b501dfba4bae6e25e2d3b0776f74ef9e94f8e72bf74c6e1a5ab4faea514388eaca830dd16c33b3dd029ea8267874a56e4a66c25a79e9ed917470972b4
|
data/README.md
CHANGED
@@ -9,6 +9,8 @@
|
|
9
9
|
|
10
10
|
Add fast and relevant search to your Jekyll site.
|
11
11
|
|
12
|
+
> While this plugin was created by Algolia, it is not an officially supported API client. It is possible that future major versions of Jekyll break compatibility, or require changes.
|
13
|
+
|
12
14
|
## Usage
|
13
15
|
|
14
16
|
```shell
|
@@ -112,7 +114,7 @@ plugins.
|
|
112
114
|
|
113
115
|
[12]: https://community.algolia.com/instantsearch.js/
|
114
116
|
|
115
|
-
[13]: https://www.algolia.com/press
|
117
|
+
[13]: https://www.algolia.com/press/?section=brand-guidelines
|
116
118
|
|
117
119
|
[14]: https://github.com/ayastreb/
|
118
120
|
|
@@ -103,7 +103,7 @@ module Jekyll
|
|
103
103
|
# Returns the value of this option, or the default value
|
104
104
|
def self.algolia(key)
|
105
105
|
config = get('algolia') || {}
|
106
|
-
value = config[key]
|
106
|
+
value = config[key].nil? ? ALGOLIA_DEFAULTS[key] : config[key]
|
107
107
|
|
108
108
|
# No value found but we have a method to define the default value
|
109
109
|
if value.nil? && respond_to?("default_#{key}")
|
@@ -159,6 +159,8 @@ module Jekyll
|
|
159
159
|
# This will be a merge of default settings and the one defined in the
|
160
160
|
# _config.yml file
|
161
161
|
def self.settings
|
162
|
+
return {} if algolia('settings') == false
|
163
|
+
|
162
164
|
user_settings = algolia('settings') || {}
|
163
165
|
ALGOLIA_DEFAULTS['settings'].merge(user_settings)
|
164
166
|
end
|
@@ -255,10 +257,10 @@ module Jekyll
|
|
255
257
|
# their values to nil values from here
|
256
258
|
def self.disable_other_plugins(config)
|
257
259
|
# Disable archive pages from jekyll-archives
|
258
|
-
config
|
260
|
+
config.delete('jekyll-archives')
|
259
261
|
|
260
262
|
# Disable pagination from jekyll-paginate
|
261
|
-
config
|
263
|
+
config.delete('paginate')
|
262
264
|
|
263
265
|
# Disable pagination for jekyll-paginate-v2
|
264
266
|
config['pagination'] = {} unless config['pagination'].is_a?(Hash)
|
@@ -269,8 +271,8 @@ module Jekyll
|
|
269
271
|
config['autopages']['enabled'] = false
|
270
272
|
|
271
273
|
# Disable tags from jekyll-tagging
|
272
|
-
config
|
273
|
-
config
|
274
|
+
config.delete('tag_page_dir')
|
275
|
+
config.delete('tag_page_layout')
|
274
276
|
|
275
277
|
config
|
276
278
|
end
|
@@ -76,11 +76,9 @@ module Jekyll
|
|
76
76
|
# pages. We don't want to index those.
|
77
77
|
# Source: https://help.github.com/articles/creating-a-custom-404-page-for-your-github-pages-site/
|
78
78
|
#
|
79
|
-
# rubocop:disable Naming/PredicateName
|
80
79
|
def self.is_404?(file)
|
81
80
|
['404.md', '404.html'].include?(File.basename(file.path))
|
82
81
|
end
|
83
|
-
# rubocop:enable Naming/PredicateName
|
84
82
|
|
85
83
|
# Public: Check if the file is redirect page
|
86
84
|
#
|
@@ -258,8 +258,8 @@ module Jekyll
|
|
258
258
|
::Algolia.batch!(slice)
|
259
259
|
|
260
260
|
progress_bar.increment if should_have_progress_bar
|
261
|
-
rescue StandardError =>
|
262
|
-
ErrorHandler.stop(
|
261
|
+
rescue StandardError => e
|
262
|
+
ErrorHandler.stop(e, operations: slice)
|
263
263
|
end
|
264
264
|
end
|
265
265
|
end
|
@@ -296,6 +296,8 @@ module Jekyll
|
|
296
296
|
# If the settingID are not matching, it means our config is different, so
|
297
297
|
# we push it, overriding the settingID for next push.
|
298
298
|
def self.update_settings
|
299
|
+
return if Configurator.settings.empty?
|
300
|
+
|
299
301
|
current_remote_settings = remote_settings || {}
|
300
302
|
remote_setting_id = current_remote_settings.dig('userData', 'settingID')
|
301
303
|
|
@@ -338,8 +340,8 @@ module Jekyll
|
|
338
340
|
# rubocop:disable Naming/AccessorMethodName
|
339
341
|
def self.set_settings(settings)
|
340
342
|
index.set_settings!(settings)
|
341
|
-
rescue StandardError =>
|
342
|
-
ErrorHandler.stop(
|
343
|
+
rescue StandardError => e
|
344
|
+
ErrorHandler.stop(e, settings: settings)
|
343
345
|
end
|
344
346
|
# rubocop:enable Naming/AccessorMethodName
|
345
347
|
|
@@ -24,6 +24,13 @@ module Jekyll
|
|
24
24
|
command.option 'force_settings',
|
25
25
|
'--force-settings',
|
26
26
|
'Force updating of the index settings'
|
27
|
+
command.option 'future',
|
28
|
+
'--future',
|
29
|
+
'Index posts with a future date'
|
30
|
+
command.option 'show_drafts',
|
31
|
+
'--drafts',
|
32
|
+
'-D',
|
33
|
+
'Index posts in the _drafts folder'
|
27
34
|
|
28
35
|
command.action do |_, options|
|
29
36
|
configuration = configuration_from_options(options)
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-algolia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Carry
|
8
|
-
|
8
|
+
- Sylvain Utard
|
9
|
+
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2021-05-06 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: algolia_html_extractor
|
@@ -30,14 +31,14 @@ dependencies:
|
|
30
31
|
requirements:
|
31
32
|
- - "~>"
|
32
33
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
34
|
+
version: '1.26'
|
34
35
|
type: :runtime
|
35
36
|
prerelease: false
|
36
37
|
version_requirements: !ruby/object:Gem::Requirement
|
37
38
|
requirements:
|
38
39
|
- - "~>"
|
39
40
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
41
|
+
version: '1.26'
|
41
42
|
- !ruby/object:Gem::Dependency
|
42
43
|
name: filesize
|
43
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,16 +57,22 @@ dependencies:
|
|
56
57
|
name: jekyll
|
57
58
|
requirement: !ruby/object:Gem::Requirement
|
58
59
|
requirements:
|
59
|
-
- - "
|
60
|
+
- - ">="
|
60
61
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
62
|
+
version: '3.6'
|
63
|
+
- - "<"
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '5.0'
|
62
66
|
type: :runtime
|
63
67
|
prerelease: false
|
64
68
|
version_requirements: !ruby/object:Gem::Requirement
|
65
69
|
requirements:
|
66
|
-
- - "
|
70
|
+
- - ">="
|
67
71
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
72
|
+
version: '3.6'
|
73
|
+
- - "<"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '5.0'
|
69
76
|
- !ruby/object:Gem::Dependency
|
70
77
|
name: json
|
71
78
|
requirement: !ruby/object:Gem::Requirement
|
@@ -277,7 +284,7 @@ dependencies:
|
|
277
284
|
- !ruby/object:Gem::Version
|
278
285
|
version: '0.10'
|
279
286
|
description: Index all your content into Algolia by running `jekyll algolia`
|
280
|
-
email:
|
287
|
+
email: support@algolia.com
|
281
288
|
executables: []
|
282
289
|
extensions: []
|
283
290
|
extra_rdoc_files: []
|
@@ -318,7 +325,7 @@ homepage: https://github.com/algolia/jekyll-algolia
|
|
318
325
|
licenses:
|
319
326
|
- MIT
|
320
327
|
metadata: {}
|
321
|
-
post_install_message:
|
328
|
+
post_install_message:
|
322
329
|
rdoc_options: []
|
323
330
|
require_paths:
|
324
331
|
- lib
|
@@ -333,9 +340,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
333
340
|
- !ruby/object:Gem::Version
|
334
341
|
version: '0'
|
335
342
|
requirements: []
|
336
|
-
|
337
|
-
|
338
|
-
signing_key:
|
343
|
+
rubygems_version: 3.2.3
|
344
|
+
signing_key:
|
339
345
|
specification_version: 4
|
340
346
|
summary: Index your Jekyll content into Algolia
|
341
347
|
test_files: []
|