jekyll-algolia 1.4.2 → 1.4.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83d5d5dc0855c5a04fec685aa2538f65cfa0d9d9
4
- data.tar.gz: a995dd304d0b12b9e122a2729f36d55dc60ee663
3
+ metadata.gz: 3c80519b95729c555f91c245294ec9a8366687fb
4
+ data.tar.gz: 75b3e0a27516190da019db059830f8eec4067075
5
5
  SHA512:
6
- metadata.gz: 2a5de7446c8ede933ded49f9a8fb819559b097d947529535404b79ecbeef6ca89ef293498929da4a77fa6da74b46ad81fe78e457423b5f01b8aaacbbf8425f05
7
- data.tar.gz: 646b7126e761ddaced88053693d4c86f32ec1ca5ee772b13351345eaa006ab761d560578c504613e1845adc16953d15616459c302c95f5500bdce626e876df63
6
+ metadata.gz: 6433c4f0309e8a581463caadad15ba549ac80368b4d5b13a62308c1246b71a52fa8bb4283c5ef19ce21323365f644809613ceea8f6c4f9e0cb85301370f30c38
7
+ data.tar.gz: 2a0b1ca02a65d76f8fc93024b8ec2ba98f6b99a00cf9418d53a798714b4ee8f1fdf75fa0b4c88b899cca109e153fe7cb8d2237770a8baba5c44e4593151c7fd8
@@ -198,7 +198,7 @@ module Jekyll
198
198
  # User can still add it by manually specifying a `files_to_exclude` to an
199
199
  # empty array
200
200
  def self.default_files_to_exclude
201
- algolia('extensions_to_index').map do |extension|
201
+ extensions_to_index.map do |extension|
202
202
  "index.#{extension}"
203
203
  end
204
204
  end
@@ -231,6 +231,17 @@ module Jekyll
231
231
  false
232
232
  end
233
233
 
234
+ # Public: Returns a list of extensions to index
235
+ #
236
+ # Will use default values or read the algolia.extensions_to_index key.
237
+ # Accepts both an array or a comma-separated list
238
+ def self.extensions_to_index
239
+ extensions = algolia('extensions_to_index')
240
+ return [] if extensions.nil?
241
+ extensions = extensions.split(',') if extensions.is_a? String
242
+ extensions
243
+ end
244
+
234
245
  # Public: Disable features from other Jekyll plugins that might interfere
235
246
  # with the indexing
236
247
  def self.disable_other_plugins(config)
@@ -101,7 +101,7 @@ module Jekyll
101
101
  # and raw HTML files but this list can be extended using the
102
102
  # `extensions_to_index` config option.
103
103
  def self.allowed_extension?(file)
104
- extensions = Configurator.algolia('extensions_to_index')
104
+ extensions = Configurator.extensions_to_index
105
105
  extname = File.extname(file.path)[1..-1]
106
106
  extensions.include?(extname)
107
107
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Algolia
5
- VERSION = '1.4.2'
5
+ VERSION = '1.4.3'
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.4.2
4
+ version: 1.4.3
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-05-14 00:00:00.000000000 Z
11
+ date: 2018-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: algolia_html_extractor