jekyll 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of jekyll might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/jekyll/document.rb +14 -9
- data/lib/jekyll/site.rb +1 -1
- data/lib/jekyll/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbceef751c1ed39cdd114281048271b98f2964bb
|
4
|
+
data.tar.gz: 6e8a4c06979282eb307f59270fd3bb75513863ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af52df4c2c894accde6a6766b33204f6223b9c1cb00547ffe0806e9a1b794492b8769209737e0c3bad46e0405d72ada24e2ba5909ccc832b070ea349b925ad8d
|
7
|
+
data.tar.gz: 3da43c4067d652df4b857cc2161c5ee99f58f660d57643128eb97bdb8ca136f109447ded5b9bdc02da5857c24dc994d3b679e660a414595cc2e41a5bf074e985
|
data/lib/jekyll/document.rb
CHANGED
@@ -58,7 +58,7 @@ module Jekyll
|
|
58
58
|
# Merge some data in with this document's data.
|
59
59
|
#
|
60
60
|
# Returns the merged data.
|
61
|
-
def merge_data!(other)
|
61
|
+
def merge_data!(other, source: "YAML front matter")
|
62
62
|
if other.key?('categories') && !other['categories'].nil?
|
63
63
|
if other['categories'].is_a?(String)
|
64
64
|
other['categories'] = other['categories'].split(" ").map(&:strip)
|
@@ -67,7 +67,7 @@ module Jekyll
|
|
67
67
|
end
|
68
68
|
Utils.deep_merge_hashes!(data, other)
|
69
69
|
if data.key?('date') && !data['date'].is_a?(Time)
|
70
|
-
|
70
|
+
data['date'] = Utils.parse_date(data['date'].to_s, "Document '#{relative_path}' does not have a valid date in the #{source}.")
|
71
71
|
end
|
72
72
|
data
|
73
73
|
end
|
@@ -287,20 +287,23 @@ module Jekyll
|
|
287
287
|
else
|
288
288
|
begin
|
289
289
|
defaults = @site.frontmatter_defaults.all(url, collection.label.to_sym)
|
290
|
-
merge_data!(defaults) unless defaults.empty?
|
290
|
+
merge_data!(defaults, source: "front matter defaults") unless defaults.empty?
|
291
291
|
|
292
292
|
self.content = File.read(path, merged_file_read_opts(opts))
|
293
293
|
if content =~ YAML_FRONT_MATTER_REGEXP
|
294
294
|
self.content = $POSTMATCH
|
295
295
|
data_file = SafeYAML.load($1)
|
296
|
-
merge_data!(data_file) if data_file
|
296
|
+
merge_data!(data_file, source: "YAML front matter") if data_file
|
297
297
|
end
|
298
298
|
|
299
299
|
post_read
|
300
300
|
rescue SyntaxError => e
|
301
|
-
|
301
|
+
Jekyll.logger.error "Error:", "YAML Exception reading #{path}: #{e.message}"
|
302
302
|
rescue Exception => e
|
303
|
-
|
303
|
+
if e.is_a? Jekyll::Errors::FatalException
|
304
|
+
raise e
|
305
|
+
end
|
306
|
+
Jekyll.logger.error "Error:", "could not read file #{path}: #{e.message}"
|
304
307
|
end
|
305
308
|
end
|
306
309
|
end
|
@@ -311,8 +314,10 @@ module Jekyll
|
|
311
314
|
merge_data!({
|
312
315
|
"slug" => slug,
|
313
316
|
"ext" => ext
|
314
|
-
})
|
315
|
-
|
317
|
+
}, source: "filename")
|
318
|
+
if data['date'].nil? || data['date'].to_i == site.time.to_i
|
319
|
+
merge_data!({"date" => date}, source: "filename")
|
320
|
+
end
|
316
321
|
data['title'] ||= slug.split('-').select {|w| w.capitalize! || w }.join(' ')
|
317
322
|
end
|
318
323
|
populate_categories
|
@@ -332,7 +337,7 @@ module Jekyll
|
|
332
337
|
superdirs = relative_path.sub(/#{special_dir}(.*)/, '').split(File::SEPARATOR).reject do |c|
|
333
338
|
c.empty? || c.eql?(special_dir) || c.eql?(basename)
|
334
339
|
end
|
335
|
-
merge_data!({ 'categories' => superdirs })
|
340
|
+
merge_data!({ 'categories' => superdirs }, source: "file path")
|
336
341
|
end
|
337
342
|
|
338
343
|
def populate_categories
|
data/lib/jekyll/site.rb
CHANGED
@@ -224,7 +224,7 @@ module Jekyll
|
|
224
224
|
# Build a hash map based on the specified post attribute ( post attr =>
|
225
225
|
# array of posts ) then sort each array in reverse order.
|
226
226
|
hash = Hash.new { |h, key| h[key] = [] }
|
227
|
-
posts.docs.each { |p| p.data[post_attr].each { |t| hash[t] << p } }
|
227
|
+
posts.docs.each { |p| p.data[post_attr].each { |t| hash[t] << p } if p.data[post_attr] }
|
228
228
|
hash.values.each { |posts| posts.sort!.reverse! }
|
229
229
|
hash
|
230
230
|
end
|
data/lib/jekyll/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Preston-Werner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: liquid
|
@@ -234,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
234
234
|
version: '0'
|
235
235
|
requirements: []
|
236
236
|
rubyforge_project:
|
237
|
-
rubygems_version: 2.
|
237
|
+
rubygems_version: 2.5.1
|
238
238
|
signing_key:
|
239
239
|
specification_version: 2
|
240
240
|
summary: A simple, blog aware, static site generator.
|