jekyll-algolia 1.4.6 → 1.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/algolia/file_browser.rb +12 -1
- data/lib/jekyll/algolia/version.rb +1 -1
- 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: 8fcc627a7b1dd5f0969aee5dd9b11520172b56b0
|
4
|
+
data.tar.gz: 2c0e87cf5c96179356da5d91c99b18a66d123c99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '095ff54e1d9f31b5110d534bebbab7a8390dff9f8095ee95632e947d5adcd079fc33b9255ac1b6e900ec2183683f07ab27e3f30c7de7ae79903757e89ffdcdd3'
|
7
|
+
data.tar.gz: eb31b4f658e1097feb27a5d4762b0eab6087f11086c958c8acf727b6dfbb10e25ff6600c4e47c939aa17815b229feef230de636f999bd96aae2097d3ae86c996
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'algolia_html_extractor'
|
4
4
|
require 'pathname'
|
5
|
+
require 'time'
|
5
6
|
|
6
7
|
module Jekyll
|
7
8
|
module Algolia
|
@@ -234,7 +235,7 @@ module Jekyll
|
|
234
235
|
def self.date(file)
|
235
236
|
# Collections get their date from .date, while pages read it from .data.
|
236
237
|
# Jekyll by default will set the date of collection to the current date,
|
237
|
-
# but we
|
238
|
+
# but we monkey-patched that so it returns nil for collection items
|
238
239
|
date = if file.respond_to?(:date)
|
239
240
|
file.date
|
240
241
|
else
|
@@ -242,6 +243,16 @@ module Jekyll
|
|
242
243
|
end
|
243
244
|
|
244
245
|
return nil if date.nil?
|
246
|
+
|
247
|
+
# If date is a string, we try to parse it
|
248
|
+
if date.is_a? String
|
249
|
+
begin
|
250
|
+
date = Time.parse(date)
|
251
|
+
rescue StandardError
|
252
|
+
return nil
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
245
256
|
date.to_time.to_i
|
246
257
|
end
|
247
258
|
|
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.
|
4
|
+
version: 1.4.7
|
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-07-
|
11
|
+
date: 2018-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: algolia_html_extractor
|