algoliasearch-jekyll 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/push.rb +8 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33c6e72889f35db789517b3a9a8b86e97355dac4
|
4
|
+
data.tar.gz: b10d1a46e90b2fe938aebc8f801d3a1b034f029e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
37
|
-
ext =
|
38
|
-
|
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 && !
|
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.
|
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-
|
11
|
+
date: 2015-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|