jekyll-algolia 1.4.9 → 1.7.0

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
  SHA256:
3
- metadata.gz: b588a386a93a1d56d7fb38a112b0bb4dffc7c8c241be3c82ed521fd463337bdd
4
- data.tar.gz: 0f0c6462e81c5206a9c55b96501c63e1d16a6b12c748ea3c1d99336746a06ba2
3
+ metadata.gz: 8e25f44ea863e7df956f7629ec0ef140576f01166f1dc1db15c4592d8131e517
4
+ data.tar.gz: 4c01bab60fb28d44ef99520c5f622991590d1a17311ac4957c01674fb3d6261c
5
5
  SHA512:
6
- metadata.gz: 836973576f66ec70396bfcf7f7d2e4b3935a340af50ab6b548a30450b42140a2f339b4e3d685390502c1191dd35fef1301efb53e506fd82792e24bea6671cd51
7
- data.tar.gz: bbe8dc1b8792365d15ef39c518fa77b6aedc384435d6abfcd97ad29e57251198e384611bbd60d95977104ed4526d3b0646d69ba4aa66d3b695ad62094a00a914
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#resources
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] || ALGOLIA_DEFAULTS[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['jekyll-archives'] = nil
260
+ config.delete('jekyll-archives')
259
261
 
260
262
  # Disable pagination from jekyll-paginate
261
- config['paginate'] = nil
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['tag_page_dir'] = nil
273
- config['tag_page_layout'] = nil
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 => error
262
- ErrorHandler.stop(error, operations: slice)
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 => error
342
- ErrorHandler.stop(error, settings: settings)
343
+ rescue StandardError => e
344
+ ErrorHandler.stop(e, settings: settings)
343
345
  end
344
346
  # rubocop:enable Naming/AccessorMethodName
345
347
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Algolia
5
- VERSION = '1.4.9'
5
+ VERSION = '1.7.0'
6
6
  end
7
7
  end
@@ -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.9
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Carry
8
- autorequire:
8
+ - Sylvain Utard
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2018-12-14 00:00:00.000000000 Z
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.18'
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.18'
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.0'
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.0'
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: tim@pixelastic.com
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
- rubyforge_project:
337
- rubygems_version: 2.7.7
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: []