jekyll 4.0.0.pre.beta1 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll.rb +1 -1
- data/lib/jekyll/commands/new.rb +2 -2
- data/lib/jekyll/configuration.rb +6 -4
- data/lib/jekyll/convertible.rb +4 -3
- data/lib/jekyll/drops/url_drop.rb +1 -1
- data/lib/jekyll/entry_filter.rb +1 -1
- data/lib/jekyll/filters.rb +1 -1
- data/lib/jekyll/liquid_renderer/table.rb +17 -60
- data/lib/jekyll/site.rb +3 -3
- data/lib/jekyll/theme.rb +0 -8
- data/lib/jekyll/version.rb +1 -1
- metadata +19 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d628ad7c78b42c6430f0fa42153b0039881f581d1151678cb2d99a5256f0628
|
4
|
+
data.tar.gz: 22a33c4249c92f5ce5e75d60420c11df71852a58b64a254ddb53c6ffec4f3ce9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68b602c0af4b2e2540584f3bf6210f07363d51b50a484d5134f8c69d38a7f5893fe130f6e63218e36e2f3a6e05a54eb8a46c220540a852cdc2417d8e0b24fb1d
|
7
|
+
data.tar.gz: ab9c8776960d49245f22c6b5b759e2928cd77338a592374c14357e561c1525f1f6720e10c8bdecf0d3bb5c1231bb823ad9cd40fb6038a9c7198572f9879a1ba8
|
data/lib/jekyll.rb
CHANGED
data/lib/jekyll/commands/new.rb
CHANGED
@@ -80,13 +80,13 @@ module Jekyll
|
|
80
80
|
# Happy Jekylling!
|
81
81
|
gem "jekyll", "~> #{Jekyll::VERSION}"
|
82
82
|
# This is the default theme for new Jekyll sites. You may change this to anything you like.
|
83
|
-
gem "minima", "~> 2.
|
83
|
+
gem "minima", "~> 2.5"
|
84
84
|
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
|
85
85
|
# uncomment the line below. To upgrade, run `bundle update github-pages`.
|
86
86
|
# gem "github-pages", group: :jekyll_plugins
|
87
87
|
# If you have any plugins, put them here!
|
88
88
|
group :jekyll_plugins do
|
89
|
-
gem "jekyll-feed", "~> 0.
|
89
|
+
gem "jekyll-feed", "~> 0.12"
|
90
90
|
end
|
91
91
|
|
92
92
|
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
|
data/lib/jekyll/configuration.rb
CHANGED
@@ -4,7 +4,7 @@ module Jekyll
|
|
4
4
|
class Configuration < Hash
|
5
5
|
# Default options. Overridden by values in _config.yml.
|
6
6
|
# Strings rather than symbols are used for compatibility with YAML.
|
7
|
-
DEFAULTS =
|
7
|
+
DEFAULTS = {
|
8
8
|
# Where things are
|
9
9
|
"source" => Dir.pwd,
|
10
10
|
"destination" => File.join(Dir.pwd, "_site"),
|
@@ -75,7 +75,7 @@ module Jekyll
|
|
75
75
|
"footnote_nr" => 1,
|
76
76
|
"show_warnings" => false,
|
77
77
|
},
|
78
|
-
}.
|
78
|
+
}.each_with_object(Configuration.new) { |(k, v), hsh| hsh[k] = v.freeze }.freeze
|
79
79
|
|
80
80
|
class << self
|
81
81
|
# Static: Produce a Configuration ready for use in a Site.
|
@@ -94,7 +94,7 @@ module Jekyll
|
|
94
94
|
#
|
95
95
|
# Return a copy of the hash where all its keys are strings
|
96
96
|
def stringify_keys
|
97
|
-
|
97
|
+
each_with_object({}) { |(k, v), hsh| hsh[k.to_s] = v }
|
98
98
|
end
|
99
99
|
|
100
100
|
def get_config_value_with_override(config_key, override)
|
@@ -235,7 +235,9 @@ module Jekyll
|
|
235
235
|
|
236
236
|
# Ensure we have a hash.
|
237
237
|
if config["collections"].is_a?(Array)
|
238
|
-
config["collections"] =
|
238
|
+
config["collections"] = config["collections"].each_with_object({}) do |collection, hash|
|
239
|
+
hash[collection] = {}
|
240
|
+
end
|
239
241
|
end
|
240
242
|
|
241
243
|
config["collections"] = Utils.deep_merge_hashes(
|
data/lib/jekyll/convertible.rb
CHANGED
@@ -112,9 +112,10 @@ module Jekyll
|
|
112
112
|
#
|
113
113
|
# Returns the Hash representation of this Convertible.
|
114
114
|
def to_liquid(attrs = nil)
|
115
|
-
further_data =
|
116
|
-
|
117
|
-
|
115
|
+
further_data = \
|
116
|
+
(attrs || self.class::ATTRIBUTES_FOR_LIQUID).each_with_object({}) do |attribute, hsh|
|
117
|
+
hsh[attribute] = send(attribute)
|
118
|
+
end
|
118
119
|
|
119
120
|
defaults = site.frontmatter_defaults.all(relative_path, type)
|
120
121
|
Utils.deep_merge_hashes defaults, Utils.deep_merge_hashes(data, further_data)
|
data/lib/jekyll/entry_filter.rb
CHANGED
data/lib/jekyll/filters.rb
CHANGED
@@ -372,7 +372,7 @@ module Jekyll
|
|
372
372
|
# return numeric values as numbers for proper sorting
|
373
373
|
def parse_sort_input(property)
|
374
374
|
number_like = %r!\A\s*-?(?:\d+\.?\d*|\.\d+)\s*\Z!
|
375
|
-
return property.to_f if property =~ number_like
|
375
|
+
return property.to_f if property.to_s =~ number_like
|
376
376
|
|
377
377
|
property
|
378
378
|
end
|
@@ -10,72 +10,29 @@ module Jekyll
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def to_s(num_of_rows = 50)
|
13
|
-
|
14
|
-
widths = table_widths(data)
|
15
|
-
generate_table(data, widths)
|
13
|
+
tabulate(data_for_table(num_of_rows))
|
16
14
|
end
|
17
15
|
|
18
16
|
private
|
19
17
|
|
20
|
-
def
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
str << "\n"
|
37
|
-
str
|
38
|
-
end
|
39
|
-
|
40
|
-
def generate_table_head_border(row_data, widths)
|
41
|
-
str = +""
|
42
|
-
|
43
|
-
row_data.each_index do |cell_index|
|
44
|
-
str << "-" * widths[cell_index]
|
45
|
-
str << "-+-" unless cell_index == row_data.length - 1
|
46
|
-
end
|
47
|
-
|
48
|
-
str << "\n"
|
49
|
-
str
|
50
|
-
end
|
51
|
-
|
52
|
-
def generate_row(row_data, widths)
|
53
|
-
str = +""
|
54
|
-
|
55
|
-
row_data.each_with_index do |cell_data, cell_index|
|
56
|
-
str << if cell_index.zero?
|
57
|
-
cell_data.ljust(widths[cell_index], " ")
|
58
|
-
else
|
59
|
-
cell_data.rjust(widths[cell_index], " ")
|
60
|
-
end
|
61
|
-
|
62
|
-
str << " | " unless cell_index == row_data.length - 1
|
63
|
-
end
|
64
|
-
|
65
|
-
str << "\n"
|
66
|
-
str
|
67
|
-
end
|
68
|
-
|
69
|
-
def table_widths(data)
|
70
|
-
widths = []
|
71
|
-
|
72
|
-
data.each do |row|
|
73
|
-
row.each_with_index do |cell, index|
|
74
|
-
widths[index] = [cell.length, widths[index]].compact.max
|
75
|
-
end
|
18
|
+
def tabulate(data)
|
19
|
+
require "terminal-table"
|
20
|
+
|
21
|
+
header = data.shift
|
22
|
+
footer = data.pop
|
23
|
+
output = +"\n"
|
24
|
+
|
25
|
+
table = Terminal::Table.new do |t|
|
26
|
+
t << header
|
27
|
+
t << :separator
|
28
|
+
data.each { |row| t << row }
|
29
|
+
t << :separator
|
30
|
+
t << footer
|
31
|
+
t.style = { :alignment => :right, :border_top => false, :border_bottom => false }
|
32
|
+
t.align_column(0, :left)
|
76
33
|
end
|
77
34
|
|
78
|
-
|
35
|
+
output << table.to_s << "\n"
|
79
36
|
end
|
80
37
|
|
81
38
|
# rubocop:disable Metrics/AbcSize
|
data/lib/jekyll/site.rb
CHANGED
@@ -145,9 +145,9 @@ module Jekyll
|
|
145
145
|
#
|
146
146
|
# Returns a Hash containing collection name-to-instance pairs.
|
147
147
|
def collections
|
148
|
-
@collections ||=
|
149
|
-
[
|
150
|
-
end
|
148
|
+
@collections ||= collection_names.each_with_object({}) do |name, hsh|
|
149
|
+
hsh[name] = Jekyll::Collection.new(self, name)
|
150
|
+
end
|
151
151
|
end
|
152
152
|
|
153
153
|
# The list of collection names.
|
data/lib/jekyll/theme.rb
CHANGED
@@ -10,7 +10,6 @@ module Jekyll
|
|
10
10
|
@name = name.downcase.strip
|
11
11
|
Jekyll.logger.debug "Theme:", name
|
12
12
|
Jekyll.logger.debug "Theme source:", root
|
13
|
-
configure_sass
|
14
13
|
end
|
15
14
|
|
16
15
|
def root
|
@@ -38,13 +37,6 @@ module Jekyll
|
|
38
37
|
@assets_path ||= path_for "assets"
|
39
38
|
end
|
40
39
|
|
41
|
-
def configure_sass
|
42
|
-
return unless sass_path
|
43
|
-
|
44
|
-
External.require_with_graceful_fail("sass") unless defined?(Sass)
|
45
|
-
Sass.load_paths << sass_path
|
46
|
-
end
|
47
|
-
|
48
40
|
def runtime_dependencies
|
49
41
|
gemspec.runtime_dependencies
|
50
42
|
end
|
data/lib/jekyll/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Preston-Werner
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-08-
|
13
|
+
date: 2019-08-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|
@@ -80,14 +80,14 @@ dependencies:
|
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
83
|
+
version: '2.0'
|
84
84
|
type: :runtime
|
85
85
|
prerelease: false
|
86
86
|
version_requirements: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: '
|
90
|
+
version: '2.0'
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: jekyll-watch
|
93
93
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,6 +200,20 @@ dependencies:
|
|
200
200
|
- - "~>"
|
201
201
|
- !ruby/object:Gem::Version
|
202
202
|
version: '1.0'
|
203
|
+
- !ruby/object:Gem::Dependency
|
204
|
+
name: terminal-table
|
205
|
+
requirement: !ruby/object:Gem::Requirement
|
206
|
+
requirements:
|
207
|
+
- - "~>"
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
version: '1.8'
|
210
|
+
type: :runtime
|
211
|
+
prerelease: false
|
212
|
+
version_requirements: !ruby/object:Gem::Requirement
|
213
|
+
requirements:
|
214
|
+
- - "~>"
|
215
|
+
- !ruby/object:Gem::Version
|
216
|
+
version: '1.8'
|
203
217
|
description: Jekyll is a simple, blog aware, static site generator.
|
204
218
|
email:
|
205
219
|
- maintainers@jekyllrb.com
|
@@ -339,9 +353,8 @@ metadata:
|
|
339
353
|
source_code_uri: https://github.com/jekyll/jekyll
|
340
354
|
post_install_message: |
|
341
355
|
-------------------------------------------------------------------------------------
|
342
|
-
|
356
|
+
Jekyll 4.0 comes with some major changes, notably:
|
343
357
|
|
344
|
-
Most notably:
|
345
358
|
* Our `link` tag now comes with the `relative_url` filter incorporated into it.
|
346
359
|
You should no longer prepend `{{ site.baseurl }}` to `{% link foo.md %}`
|
347
360
|
For further details: https://github.com/jekyll/jekyll/pull/6727
|