jekyll 3.1.0 → 3.1.1
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/convertible.rb +1 -7
- data/lib/jekyll/document.rb +1 -11
- data/lib/jekyll/page.rb +8 -1
- data/lib/jekyll/renderer.rb +1 -1
- data/lib/jekyll/utils.rb +10 -0
- data/lib/jekyll/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: 56c167aa9b02ffadc0482aa73eca44b948a1fbc5
|
4
|
+
data.tar.gz: 009cc8ae7b98a986ffd1792c382ab04a7e3ecfa9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f12355c33e46191613bed314fcca4d4124e5957cd1ffe394e61c99f2e99536c8c445b9dee2182f52b59d48350c7d3a785b3c49a8e86fb7665477bdcc047b8e4
|
7
|
+
data.tar.gz: 42e90646fb9484f3dfe61c2268074f7ed97656a0cc4674a07d21c12d985c5be8de08d58afa4a9d3f9414cd097cda30f9405f99c85157718ef8e7377c1d939f85
|
data/lib/jekyll/convertible.rb
CHANGED
@@ -28,12 +28,6 @@ module Jekyll
|
|
28
28
|
!(data.key?('published') && data['published'] == false)
|
29
29
|
end
|
30
30
|
|
31
|
-
# Returns merged option hash for File.read of self.site (if exists)
|
32
|
-
# and a given param
|
33
|
-
def merged_file_read_opts(opts)
|
34
|
-
(site ? site.file_read_opts : {}).merge(opts)
|
35
|
-
end
|
36
|
-
|
37
31
|
# Read the YAML frontmatter.
|
38
32
|
#
|
39
33
|
# base - The String path to the dir containing the file.
|
@@ -46,7 +40,7 @@ module Jekyll
|
|
46
40
|
|
47
41
|
begin
|
48
42
|
self.content = File.read(site.in_source_dir(base, name),
|
49
|
-
merged_file_read_opts(opts))
|
43
|
+
Utils.merged_file_read_opts(site, opts))
|
50
44
|
if content =~ /\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)/m
|
51
45
|
self.content = $POSTMATCH
|
52
46
|
self.data = SafeYAML.load(Regexp.last_match(1))
|
data/lib/jekyll/document.rb
CHANGED
@@ -237,16 +237,6 @@ module Jekyll
|
|
237
237
|
trigger_hooks(:post_write)
|
238
238
|
end
|
239
239
|
|
240
|
-
# Returns merged option hash for File.read of self.site (if exists)
|
241
|
-
# and a given param
|
242
|
-
#
|
243
|
-
# opts - override options
|
244
|
-
#
|
245
|
-
# Return the file read options hash.
|
246
|
-
def merged_file_read_opts(opts)
|
247
|
-
site ? site.file_read_opts.merge(opts) : opts
|
248
|
-
end
|
249
|
-
|
250
240
|
# Whether the file is published or not, as indicated in YAML front-matter
|
251
241
|
#
|
252
242
|
# Returns true if the 'published' key is specified in the YAML front-matter and not `false`.
|
@@ -269,7 +259,7 @@ module Jekyll
|
|
269
259
|
defaults = @site.frontmatter_defaults.all(url, collection.label.to_sym)
|
270
260
|
merge_data!(defaults, source: "front matter defaults") unless defaults.empty?
|
271
261
|
|
272
|
-
self.content = File.read(path, merged_file_read_opts(opts))
|
262
|
+
self.content = File.read(path, Utils.merged_file_read_opts(site, opts))
|
273
263
|
if content =~ YAML_FRONT_MATTER_REGEXP
|
274
264
|
self.content = $POSTMATCH
|
275
265
|
data_file = SafeYAML.load(Regexp.last_match(1))
|
data/lib/jekyll/page.rb
CHANGED
@@ -9,6 +9,8 @@ module Jekyll
|
|
9
9
|
|
10
10
|
alias_method :extname, :ext
|
11
11
|
|
12
|
+
FORWARD_SLASH = '/'.freeze
|
13
|
+
|
12
14
|
# Attributes for Liquid templates
|
13
15
|
ATTRIBUTES_FOR_LIQUID = %w(
|
14
16
|
content
|
@@ -55,7 +57,12 @@ module Jekyll
|
|
55
57
|
#
|
56
58
|
# Returns the String destination directory.
|
57
59
|
def dir
|
58
|
-
|
60
|
+
if url.end_with?(FORWARD_SLASH)
|
61
|
+
url
|
62
|
+
else
|
63
|
+
url_dir = File.dirname(url)
|
64
|
+
url_dir.end_with?(FORWARD_SLASH) ? url_dir : "#{url_dir}/"
|
65
|
+
end
|
59
66
|
end
|
60
67
|
|
61
68
|
# The full path and filename of the post. Defined in the YAML of the post
|
data/lib/jekyll/renderer.rb
CHANGED
data/lib/jekyll/utils.rb
CHANGED
@@ -273,5 +273,15 @@ module Jekyll
|
|
273
273
|
end
|
274
274
|
end
|
275
275
|
|
276
|
+
# Returns merged option hash for File.read of self.site (if exists)
|
277
|
+
# and a given param
|
278
|
+
def merged_file_read_opts(site, opts)
|
279
|
+
merged = (site ? site.file_read_opts : {}).merge(opts)
|
280
|
+
if merged["encoding"] && !merged["encoding"].start_with?("bom|")
|
281
|
+
merged["encoding"].insert(0, "bom|")
|
282
|
+
end
|
283
|
+
merged
|
284
|
+
end
|
285
|
+
|
276
286
|
end
|
277
287
|
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.1.
|
4
|
+
version: 3.1.1
|
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: 2016-01-
|
11
|
+
date: 2016-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: liquid
|