algoliasearch-jekyll 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/push.rb +8 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 300e5c91ad0901840959d34b5cbb65d85f8508a8
4
- data.tar.gz: fb8ec8f5a6a9afb49c81adf20c0b09ddbc4da15f
3
+ metadata.gz: 33c6e72889f35db789517b3a9a8b86e97355dac4
4
+ data.tar.gz: b10d1a46e90b2fe938aebc8f801d3a1b034f029e
5
5
  SHA512:
6
- metadata.gz: cee39f180e347887d52eaf144530aa146e057be93f395291d7f74e4e4ee608de2d8a804b7a6334b5d38247d5e4b1e5641fc192c7ae5b55a6f3dd85eb9852fde4
7
- data.tar.gz: 2864b693fa1409dda9edfe64724c2e771ab5d9b6c778f8d1034dcd931471e5d02ce5c8bff2708db4711a5898bb266d3c6190428c2fab26d6e0576007973a997b
6
+ metadata.gz: 1687ec9dcfe975c964ca5d27c3a6f553d746399b1d7db71462bdad3463e40f0cecf89db9624d1eab80b7b07fe9880ecf0ead27aa68db7c74cdf6608ed83607c6
7
+ data.tar.gz: df50afe1129386a620c1df879b3c90645d49e783e2a6e33fa86c1078ebfb717968f9a1576a99fc59022a612101dd605f1c5cadebc1f5d47640abb45cf7f5d987
data/lib/push.rb CHANGED
@@ -33,9 +33,13 @@ class AlgoliaSearchJekyllPush < Jekyll::Command
33
33
  site.process
34
34
  end
35
35
 
36
- def markdown?(filename)
37
- ext = File.extname(filename).delete('.')
38
- @config['markdown_ext'].split(',').include?(ext)
36
+ def parseable?(file)
37
+ ext = file.ext.delete('.')
38
+ # Allow markdown and html pages
39
+ return true if @config['markdown_ext'].split(',').include?(ext)
40
+ return false unless ext == 'html'
41
+ return false unless file['title']
42
+ true
39
43
  end
40
44
 
41
45
  def check_credentials(api_key, application_id, index_name)
@@ -125,7 +129,7 @@ class AlgoliaSearchJekyllPush < Jekyll::Command
125
129
 
126
130
  # We only index posts, and markdown pages
127
131
  return nil unless is_page || is_post
128
- return nil if is_page && !markdown?(file.path)
132
+ return nil if is_page && !parseable?(file)
129
133
 
130
134
  html = file.content.gsub("\n", ' ')
131
135
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: algoliasearch-jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Carry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-18 00:00:00.000000000 Z
11
+ date: 2015-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri