jekyll-algolia 1.5.0 → 1.6.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
- SHA256:
3
- metadata.gz: b399345773d51a54abed252a06df5c1ee0d178d901c1e1e89f8b7fef69cf70de
4
- data.tar.gz: 7cd4b6b6248157bba8cf1b2d21e3e36bfcdba589ebb70559c6934029a33dce55
2
+ SHA1:
3
+ metadata.gz: acb6baac7733e9ffea20049f4da7ce780fc1a8f6
4
+ data.tar.gz: aca94cb6fdbc4cfc64ce8517d634fc27e390b69b
5
5
  SHA512:
6
- metadata.gz: abfeb9de90e42d25813036f91925f3c8e0fb42aaea2874648600e928d6051d8cd0bd23e8aef377e7e8ca099f7bc51ff26a7bf83daa662f7924c9eabc104471dd
7
- data.tar.gz: 5cb35c4f376f1f8be7e8d290a9d86a30691a51f693db4e6e876df8d1f1282f6f0d42586ceb3d114e10b4545b8c6e4a701ca162391c8ea931fb35534a09a7c55a
6
+ metadata.gz: 7da14579642014799a3e8a159b09aa7862007af435b60cbaab3fa891df9d1e8da7c711296ff45ece7cd4e47fbc55bea8a52a4237205005ba1936b2dd99ed8ec1
7
+ data.tar.gz: 55cbe18cf38a8a0adb103599dff92bf21207eeda2504e4c6bdf4b9a9ae6d65da51ddcf1688199ae49b97b0a36b41c093dd3604e41eed35d5cfbb0288cfc4beca
@@ -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
@@ -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
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Algolia
5
- VERSION = '1.5.0'
5
+ VERSION = '1.6.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-algolia
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Carry
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-09-18 00:00:00.000000000 Z
12
+ date: 2019-10-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: algolia_html_extractor
@@ -341,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
341
341
  version: '0'
342
342
  requirements: []
343
343
  rubyforge_project:
344
- rubygems_version: 2.7.7
344
+ rubygems_version: 2.5.2.3
345
345
  signing_key:
346
346
  specification_version: 4
347
347
  summary: Index your Jekyll content into Algolia