jekyll 4.2.2 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +150 -26
- data/README.markdown +16 -19
- data/lib/jekyll/cache.rb +3 -7
- data/lib/jekyll/cleaner.rb +1 -1
- data/lib/jekyll/collection.rb +1 -0
- data/lib/jekyll/commands/build.rb +2 -13
- data/lib/jekyll/commands/clean.rb +1 -2
- data/lib/jekyll/commands/doctor.rb +13 -13
- data/lib/jekyll/commands/new.rb +5 -9
- data/lib/jekyll/commands/new_theme.rb +3 -4
- data/lib/jekyll/commands/serve/live_reload_reactor.rb +3 -6
- data/lib/jekyll/commands/serve/mime_types_charset.json +71 -0
- data/lib/jekyll/commands/serve/servlet.rb +13 -9
- data/lib/jekyll/commands/serve.rb +23 -18
- data/lib/jekyll/configuration.rb +2 -2
- data/lib/jekyll/converters/markdown/kramdown_parser.rb +13 -15
- data/lib/jekyll/data_entry.rb +83 -0
- data/lib/jekyll/data_hash.rb +61 -0
- data/lib/jekyll/deprecator.rb +1 -1
- data/lib/jekyll/document.rb +2 -3
- data/lib/jekyll/drops/document_drop.rb +1 -0
- data/lib/jekyll/drops/excerpt_drop.rb +4 -0
- data/lib/jekyll/drops/site_drop.rb +6 -1
- data/lib/jekyll/drops/theme_drop.rb +36 -0
- data/lib/jekyll/drops/unified_payload_drop.rb +6 -2
- data/lib/jekyll/entry_filter.rb +2 -6
- data/lib/jekyll/excerpt.rb +5 -6
- data/lib/jekyll/external.rb +17 -21
- data/lib/jekyll/filters.rb +11 -14
- data/lib/jekyll/frontmatter_defaults.rb +2 -4
- data/lib/jekyll/hooks.rb +2 -2
- data/lib/jekyll/layout.rb +8 -20
- data/lib/jekyll/mime.types +146 -73
- data/lib/jekyll/page.rb +2 -4
- data/lib/jekyll/path_manager.rb +7 -7
- data/lib/jekyll/plugin_manager.rb +12 -4
- data/lib/jekyll/profiler.rb +0 -3
- data/lib/jekyll/reader.rb +18 -1
- data/lib/jekyll/readers/data_reader.rb +51 -14
- data/lib/jekyll/renderer.rb +8 -10
- data/lib/jekyll/site.rb +52 -21
- data/lib/jekyll/static_file.rb +6 -9
- data/lib/jekyll/tags/highlight.rb +13 -9
- data/lib/jekyll/tags/include.rb +4 -4
- data/lib/jekyll/tags/post_url.rb +5 -5
- data/lib/jekyll/theme.rb +6 -2
- data/lib/jekyll/theme_builder.rb +1 -1
- data/lib/jekyll/url.rb +1 -1
- data/lib/jekyll/utils/ansi.rb +1 -1
- data/lib/jekyll/utils/win_tz.rb +18 -47
- data/lib/jekyll/utils.rb +18 -7
- data/lib/jekyll/version.rb +1 -1
- data/lib/jekyll.rb +3 -1
- data/lib/site_template/_config.yml +1 -1
- data/lib/theme_template/README.md.erb +1 -3
- metadata +61 -13
data/lib/jekyll/utils.rb
CHANGED
@@ -47,7 +47,14 @@ module Jekyll
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def mergable?(value)
|
50
|
-
|
50
|
+
case value
|
51
|
+
when Hash, Drops::Drop, DataHash
|
52
|
+
true
|
53
|
+
when DataEntry
|
54
|
+
mergable?(value.data)
|
55
|
+
else
|
56
|
+
false
|
57
|
+
end
|
51
58
|
end
|
52
59
|
|
53
60
|
def duplicable?(obj)
|
@@ -128,7 +135,8 @@ module Jekyll
|
|
128
135
|
# Returns the parsed date if successful, throws a FatalException
|
129
136
|
# if not
|
130
137
|
def parse_date(input, msg = "Input could not be parsed.")
|
131
|
-
|
138
|
+
@parse_date_cache ||= {}
|
139
|
+
@parse_date_cache[input] ||= Time.parse(input).localtime
|
132
140
|
rescue ArgumentError
|
133
141
|
raise Errors::InvalidDateError, "Invalid date '#{input}': #{msg}"
|
134
142
|
end
|
@@ -143,7 +151,7 @@ module Jekyll
|
|
143
151
|
false
|
144
152
|
end
|
145
153
|
|
146
|
-
# Determine whether the given content string contains Liquid Tags or
|
154
|
+
# Determine whether the given content string contains Liquid Tags or Variables
|
147
155
|
#
|
148
156
|
# Returns true is the string contains sequences of `{%` or `{{`
|
149
157
|
def has_liquid_construct?(content)
|
@@ -265,7 +273,7 @@ module Jekyll
|
|
265
273
|
template
|
266
274
|
end
|
267
275
|
|
268
|
-
# Work the same way as Dir.glob but
|
276
|
+
# Work the same way as Dir.glob but separating the input into two parts
|
269
277
|
# ('dir' + '/' + 'pattern') to make sure the first part('dir') does not act
|
270
278
|
# as a pattern.
|
271
279
|
#
|
@@ -287,7 +295,7 @@ module Jekyll
|
|
287
295
|
# patterns - the patterns (or the pattern) which will be applied under the dir
|
288
296
|
# flags - the flags which will be applied to the pattern
|
289
297
|
#
|
290
|
-
# Returns matched
|
298
|
+
# Returns matched paths
|
291
299
|
def safe_glob(dir, patterns, flags = 0)
|
292
300
|
return [] unless Dir.exist?(dir)
|
293
301
|
|
@@ -303,12 +311,15 @@ module Jekyll
|
|
303
311
|
# and a given param
|
304
312
|
def merged_file_read_opts(site, opts)
|
305
313
|
merged = (site ? site.file_read_opts : {}).merge(opts)
|
306
|
-
|
314
|
+
|
315
|
+
# always use BOM when reading UTF-encoded files
|
316
|
+
if merged[:encoding]&.downcase&.start_with?("utf-")
|
307
317
|
merged[:encoding] = "bom|#{merged[:encoding]}"
|
308
318
|
end
|
309
|
-
if merged["encoding"]
|
319
|
+
if merged["encoding"]&.downcase&.start_with?("utf-")
|
310
320
|
merged["encoding"] = "bom|#{merged["encoding"]}"
|
311
321
|
end
|
322
|
+
|
312
323
|
merged
|
313
324
|
end
|
314
325
|
|
data/lib/jekyll/version.rb
CHANGED
data/lib/jekyll.rb
CHANGED
@@ -45,6 +45,8 @@ module Jekyll
|
|
45
45
|
autoload :Collection, "jekyll/collection"
|
46
46
|
autoload :Configuration, "jekyll/configuration"
|
47
47
|
autoload :Convertible, "jekyll/convertible"
|
48
|
+
autoload :DataEntry, "jekyll/data_entry"
|
49
|
+
autoload :DataHash, "jekyll/data_hash"
|
48
50
|
autoload :Deprecator, "jekyll/deprecator"
|
49
51
|
autoload :Document, "jekyll/document"
|
50
52
|
autoload :EntryFilter, "jekyll/entry_filter"
|
@@ -148,7 +150,7 @@ module Jekyll
|
|
148
150
|
|
149
151
|
# Public: Set the log writer.
|
150
152
|
# New log writer must respond to the same methods
|
151
|
-
# as Ruby's
|
153
|
+
# as Ruby's internal Logger.
|
152
154
|
#
|
153
155
|
# writer - the new Logger-compatible log transport
|
154
156
|
#
|
@@ -8,7 +8,7 @@
|
|
8
8
|
# For technical reasons, this file is *NOT* reloaded automatically when you use
|
9
9
|
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
|
10
10
|
#
|
11
|
-
# If you need help with YAML syntax, here are some quick references for you:
|
11
|
+
# If you need help with YAML syntax, here are some quick references for you:
|
12
12
|
# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml
|
13
13
|
# https://learnxinyminutes.com/docs/yaml/
|
14
14
|
#
|
@@ -6,7 +6,6 @@ To experiment with this code, add some sample content and run `bundle exec jekyl
|
|
6
6
|
|
7
7
|
TODO: Delete this and the text above, and describe your gem
|
8
8
|
|
9
|
-
|
10
9
|
## Installation
|
11
10
|
|
12
11
|
Add this line to your Jekyll site's `Gemfile`:
|
@@ -35,7 +34,7 @@ TODO: Write usage instructions here. Describe your available layouts, includes,
|
|
35
34
|
|
36
35
|
## Contributing
|
37
36
|
|
38
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]
|
37
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/<%= theme_name %>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://www.contributor-covenant.org/) code of conduct.
|
39
38
|
|
40
39
|
## Development
|
41
40
|
|
@@ -49,4 +48,3 @@ To add a custom directory to your theme-gem, please edit the regexp in `<%= them
|
|
49
48
|
## License
|
50
49
|
|
51
50
|
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
52
|
-
|
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.
|
4
|
+
version: 4.3.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: 2022-
|
13
|
+
date: 2022-10-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|
@@ -72,16 +72,22 @@ dependencies:
|
|
72
72
|
name: jekyll-sass-converter
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
|
-
- - "
|
75
|
+
- - ">="
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '2.0'
|
78
|
+
- - "<"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '4.0'
|
78
81
|
type: :runtime
|
79
82
|
prerelease: false
|
80
83
|
version_requirements: !ruby/object:Gem::Requirement
|
81
84
|
requirements:
|
82
|
-
- - "
|
85
|
+
- - ">="
|
83
86
|
- !ruby/object:Gem::Version
|
84
87
|
version: '2.0'
|
88
|
+
- - "<"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '4.0'
|
85
91
|
- !ruby/object:Gem::Dependency
|
86
92
|
name: jekyll-watch
|
87
93
|
requirement: !ruby/object:Gem::Requirement
|
@@ -103,6 +109,9 @@ dependencies:
|
|
103
109
|
- - "~>"
|
104
110
|
- !ruby/object:Gem::Version
|
105
111
|
version: '2.3'
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: 2.3.1
|
106
115
|
type: :runtime
|
107
116
|
prerelease: false
|
108
117
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -110,6 +119,9 @@ dependencies:
|
|
110
119
|
- - "~>"
|
111
120
|
- !ruby/object:Gem::Version
|
112
121
|
version: '2.3'
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 2.3.1
|
113
125
|
- !ruby/object:Gem::Dependency
|
114
126
|
name: kramdown-parser-gfm
|
115
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,16 +154,22 @@ dependencies:
|
|
142
154
|
name: mercenary
|
143
155
|
requirement: !ruby/object:Gem::Requirement
|
144
156
|
requirements:
|
145
|
-
- - "
|
157
|
+
- - ">="
|
146
158
|
- !ruby/object:Gem::Version
|
147
|
-
version: 0.
|
159
|
+
version: 0.3.6
|
160
|
+
- - "<"
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '0.5'
|
148
163
|
type: :runtime
|
149
164
|
prerelease: false
|
150
165
|
version_requirements: !ruby/object:Gem::Requirement
|
151
166
|
requirements:
|
152
|
-
- - "
|
167
|
+
- - ">="
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: 0.3.6
|
170
|
+
- - "<"
|
153
171
|
- !ruby/object:Gem::Version
|
154
|
-
version: 0.
|
172
|
+
version: '0.5'
|
155
173
|
- !ruby/object:Gem::Dependency
|
156
174
|
name: pathutil
|
157
175
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,16 +188,22 @@ dependencies:
|
|
170
188
|
name: rouge
|
171
189
|
requirement: !ruby/object:Gem::Requirement
|
172
190
|
requirements:
|
173
|
-
- - "
|
191
|
+
- - ">="
|
174
192
|
- !ruby/object:Gem::Version
|
175
193
|
version: '3.0'
|
194
|
+
- - "<"
|
195
|
+
- !ruby/object:Gem::Version
|
196
|
+
version: '5.0'
|
176
197
|
type: :runtime
|
177
198
|
prerelease: false
|
178
199
|
version_requirements: !ruby/object:Gem::Requirement
|
179
200
|
requirements:
|
180
|
-
- - "
|
201
|
+
- - ">="
|
181
202
|
- !ruby/object:Gem::Version
|
182
203
|
version: '3.0'
|
204
|
+
- - "<"
|
205
|
+
- !ruby/object:Gem::Version
|
206
|
+
version: '5.0'
|
183
207
|
- !ruby/object:Gem::Dependency
|
184
208
|
name: safe_yaml
|
185
209
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,18 +220,38 @@ dependencies:
|
|
196
220
|
version: '1.0'
|
197
221
|
- !ruby/object:Gem::Dependency
|
198
222
|
name: terminal-table
|
223
|
+
requirement: !ruby/object:Gem::Requirement
|
224
|
+
requirements:
|
225
|
+
- - ">="
|
226
|
+
- !ruby/object:Gem::Version
|
227
|
+
version: '1.8'
|
228
|
+
- - "<"
|
229
|
+
- !ruby/object:Gem::Version
|
230
|
+
version: '4.0'
|
231
|
+
type: :runtime
|
232
|
+
prerelease: false
|
233
|
+
version_requirements: !ruby/object:Gem::Requirement
|
234
|
+
requirements:
|
235
|
+
- - ">="
|
236
|
+
- !ruby/object:Gem::Version
|
237
|
+
version: '1.8'
|
238
|
+
- - "<"
|
239
|
+
- !ruby/object:Gem::Version
|
240
|
+
version: '4.0'
|
241
|
+
- !ruby/object:Gem::Dependency
|
242
|
+
name: webrick
|
199
243
|
requirement: !ruby/object:Gem::Requirement
|
200
244
|
requirements:
|
201
245
|
- - "~>"
|
202
246
|
- !ruby/object:Gem::Version
|
203
|
-
version: '
|
247
|
+
version: '1.7'
|
204
248
|
type: :runtime
|
205
249
|
prerelease: false
|
206
250
|
version_requirements: !ruby/object:Gem::Requirement
|
207
251
|
requirements:
|
208
252
|
- - "~>"
|
209
253
|
- !ruby/object:Gem::Version
|
210
|
-
version: '
|
254
|
+
version: '1.7'
|
211
255
|
description: Jekyll is a simple, blog aware, static site generator.
|
212
256
|
email:
|
213
257
|
- maintainers@jekyllrb.com
|
@@ -241,6 +285,7 @@ files:
|
|
241
285
|
- lib/jekyll/commands/serve.rb
|
242
286
|
- lib/jekyll/commands/serve/live_reload_reactor.rb
|
243
287
|
- lib/jekyll/commands/serve/livereload_assets/livereload.js
|
288
|
+
- lib/jekyll/commands/serve/mime_types_charset.json
|
244
289
|
- lib/jekyll/commands/serve/servlet.rb
|
245
290
|
- lib/jekyll/commands/serve/websockets.rb
|
246
291
|
- lib/jekyll/configuration.rb
|
@@ -250,6 +295,8 @@ files:
|
|
250
295
|
- lib/jekyll/converters/markdown/kramdown_parser.rb
|
251
296
|
- lib/jekyll/converters/smartypants.rb
|
252
297
|
- lib/jekyll/convertible.rb
|
298
|
+
- lib/jekyll/data_entry.rb
|
299
|
+
- lib/jekyll/data_hash.rb
|
253
300
|
- lib/jekyll/deprecator.rb
|
254
301
|
- lib/jekyll/document.rb
|
255
302
|
- lib/jekyll/drops/collection_drop.rb
|
@@ -259,6 +306,7 @@ files:
|
|
259
306
|
- lib/jekyll/drops/jekyll_drop.rb
|
260
307
|
- lib/jekyll/drops/site_drop.rb
|
261
308
|
- lib/jekyll/drops/static_file_drop.rb
|
309
|
+
- lib/jekyll/drops/theme_drop.rb
|
262
310
|
- lib/jekyll/drops/unified_payload_drop.rb
|
263
311
|
- lib/jekyll/drops/url_drop.rb
|
264
312
|
- lib/jekyll/entry_filter.rb
|
@@ -357,7 +405,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
357
405
|
requirements:
|
358
406
|
- - ">="
|
359
407
|
- !ruby/object:Gem::Version
|
360
|
-
version: 2.
|
408
|
+
version: 2.5.0
|
361
409
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
362
410
|
requirements:
|
363
411
|
- - ">="
|