jekyll 3.1.0.pre.rc1 → 3.1.0.pre.rc2
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 +4 -1
- data/lib/jekyll/page.rb +10 -0
- data/lib/jekyll/renderer.rb +33 -10
- data/lib/jekyll/site.rb +2 -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: 0c49c2ade7b29eeb1b1928c794846db916363241
|
4
|
+
data.tar.gz: 5713d975ac97f85c1d5cda5a4377ef8d71765268
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4a476d032971178d64c3ab1087bedcaa16cfaf96c6b232d9a8461f8ed9f4db087e8af6b5691bdb2ece34e42facfdc083240fde62286c7d3fba06d0e08e8a8bd
|
7
|
+
data.tar.gz: d3b03199417ca5da4d536f30fd5d9fbd8f782acca115c613cacfdda6f74f9bb725fb7fe79658050c4c267ba2f72405f7e7d4ce24780495618c8ec8df1984a97c
|
data/lib/jekyll/convertible.rb
CHANGED
@@ -97,13 +97,7 @@ module Jekyll
|
|
97
97
|
# Returns the String extension for the output file.
|
98
98
|
# e.g. ".html" for an HTML output file.
|
99
99
|
def output_ext
|
100
|
-
|
101
|
-
ext
|
102
|
-
else
|
103
|
-
converters.map do |c|
|
104
|
-
c.output_ext(ext) unless c.is_a?(Jekyll::Converters::Identity)
|
105
|
-
end.compact.last
|
106
|
-
end
|
100
|
+
Jekyll::Renderer.new(site, self).output_ext
|
107
101
|
end
|
108
102
|
|
109
103
|
# Determine which converter to use based on this convertible's
|
data/lib/jekyll/document.rb
CHANGED
@@ -59,7 +59,10 @@ module Jekyll
|
|
59
59
|
end
|
60
60
|
Utils.deep_merge_hashes!(data, other)
|
61
61
|
if data.key?('date') && !data['date'].is_a?(Time)
|
62
|
-
data['date'] = Utils.parse_date(
|
62
|
+
data['date'] = Utils.parse_date(
|
63
|
+
data['date'].to_s,
|
64
|
+
"Document '#{relative_path}' does not have a valid date in the YAML front matter."
|
65
|
+
)
|
63
66
|
end
|
64
67
|
data
|
65
68
|
end
|
data/lib/jekyll/page.rb
CHANGED
@@ -7,6 +7,8 @@ module Jekyll
|
|
7
7
|
attr_accessor :name, :ext, :basename
|
8
8
|
attr_accessor :data, :content, :output
|
9
9
|
|
10
|
+
alias_method :extname, :ext
|
11
|
+
|
10
12
|
# Attributes for Liquid templates
|
11
13
|
ATTRIBUTES_FOR_LIQUID = %w(
|
12
14
|
content
|
@@ -160,5 +162,13 @@ module Jekyll
|
|
160
162
|
def index?
|
161
163
|
basename == 'index'
|
162
164
|
end
|
165
|
+
|
166
|
+
def trigger_hooks(hook_name, *args)
|
167
|
+
Jekyll::Hooks.trigger :pages, hook_name, self, *args
|
168
|
+
end
|
169
|
+
|
170
|
+
def write?
|
171
|
+
true
|
172
|
+
end
|
163
173
|
end
|
164
174
|
end
|
data/lib/jekyll/renderer.rb
CHANGED
@@ -22,11 +22,7 @@ module Jekyll
|
|
22
22
|
#
|
23
23
|
# Returns the output extname including the leading period.
|
24
24
|
def output_ext
|
25
|
-
@output_ext ||=
|
26
|
-
File.extname(document.permalink)
|
27
|
-
else
|
28
|
-
converters.first.output_ext(document.extname)
|
29
|
-
end
|
25
|
+
@output_ext ||= (permalink_ext || converter_output_ext)
|
30
26
|
end
|
31
27
|
|
32
28
|
######################
|
@@ -38,10 +34,18 @@ module Jekyll
|
|
38
34
|
|
39
35
|
payload["page"] = document.to_liquid
|
40
36
|
|
41
|
-
if document.
|
37
|
+
if document.respond_to? :pager
|
38
|
+
payload["paginator"] = document.pager.to_liquid
|
39
|
+
end
|
40
|
+
|
41
|
+
if document.is_a?(Document) && document.collection.label == 'posts'
|
42
42
|
payload['site']['related_posts'] = document.related_posts
|
43
43
|
end
|
44
44
|
|
45
|
+
# render and transform content (this becomes the final content of the object)
|
46
|
+
payload['highlighter_prefix'] = converters.first.highlighter_prefix
|
47
|
+
payload['highlighter_suffix'] = converters.first.highlighter_suffix
|
48
|
+
|
45
49
|
Jekyll.logger.debug "Pre-Render Hooks:", document.relative_path
|
46
50
|
document.trigger_hooks(:pre_render, payload)
|
47
51
|
|
@@ -50,10 +54,6 @@ module Jekyll
|
|
50
54
|
:registers => { :site => site, :page => payload['page'] }
|
51
55
|
}
|
52
56
|
|
53
|
-
# render and transform content (this becomes the final content of the object)
|
54
|
-
payload['highlighter_prefix'] = converters.first.highlighter_prefix
|
55
|
-
payload['highlighter_suffix'] = converters.first.highlighter_suffix
|
56
|
-
|
57
57
|
output = document.content
|
58
58
|
|
59
59
|
if document.render_with_liquid?
|
@@ -164,5 +164,28 @@ module Jekyll
|
|
164
164
|
|
165
165
|
output
|
166
166
|
end
|
167
|
+
|
168
|
+
private
|
169
|
+
|
170
|
+
def permalink_ext
|
171
|
+
if document.permalink
|
172
|
+
permalink_ext = File.extname(document.permalink)
|
173
|
+
permalink_ext unless permalink_ext.empty?
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
def converter_output_ext
|
178
|
+
if output_exts.size == 1
|
179
|
+
output_exts.last
|
180
|
+
else
|
181
|
+
output_exts[-2]
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
def output_exts
|
186
|
+
@output_exts ||= converters.map do |c|
|
187
|
+
c.output_ext(document.extname)
|
188
|
+
end.compact
|
189
|
+
end
|
167
190
|
end
|
168
191
|
end
|
data/lib/jekyll/site.rb
CHANGED
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.0.pre.
|
4
|
+
version: 3.1.0.pre.rc2
|
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-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: liquid
|
@@ -244,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
244
244
|
version: 1.3.1
|
245
245
|
requirements: []
|
246
246
|
rubyforge_project:
|
247
|
-
rubygems_version: 2.5
|
247
|
+
rubygems_version: 2.2.5
|
248
248
|
signing_key:
|
249
249
|
specification_version: 2
|
250
250
|
summary: A simple, blog aware, static site generator.
|