jekyll 3.8.3 → 3.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.rubocop.yml +2 -0
- data/lib/jekyll/commands/new.rb +13 -2
- data/lib/jekyll/commands/serve/mime_types_charset.json +71 -0
- data/lib/jekyll/commands/serve/servlet.rb +13 -11
- data/lib/jekyll/commands/serve.rb +6 -0
- data/lib/jekyll/configuration.rb +1 -0
- data/lib/jekyll/converters/markdown/kramdown_parser.rb +21 -0
- data/lib/jekyll/convertible.rb +1 -1
- data/lib/jekyll/document.rb +3 -3
- data/lib/jekyll/drops/site_drop.rb +11 -2
- data/lib/jekyll/entry_filter.rb +6 -3
- data/lib/jekyll/excerpt.rb +33 -21
- data/lib/jekyll/liquid_renderer.rb +3 -1
- data/lib/jekyll/mime.types +195 -80
- data/lib/jekyll/readers/data_reader.rb +4 -6
- data/lib/jekyll/site.rb +3 -3
- data/lib/jekyll/tags/include.rb +14 -8
- data/lib/jekyll/theme.rb +19 -3
- data/lib/jekyll/utils/platforms.rb +2 -2
- data/lib/jekyll/version.rb +1 -1
- metadata +27 -21
@@ -54,16 +54,14 @@ module Jekyll
|
|
54
54
|
def read_data_file(path)
|
55
55
|
case File.extname(path).downcase
|
56
56
|
when ".csv"
|
57
|
-
CSV.read(path,
|
57
|
+
CSV.read(path,
|
58
58
|
:headers => true,
|
59
|
-
:encoding => site.config["encoding"]
|
60
|
-
}).map(&:to_hash)
|
59
|
+
:encoding => site.config["encoding"]).map(&:to_hash)
|
61
60
|
when ".tsv"
|
62
|
-
CSV.read(path,
|
61
|
+
CSV.read(path,
|
63
62
|
:col_sep => "\t",
|
64
63
|
:headers => true,
|
65
|
-
:encoding => site.config["encoding"]
|
66
|
-
}).map(&:to_hash)
|
64
|
+
:encoding => site.config["encoding"]).map(&:to_hash)
|
67
65
|
else
|
68
66
|
SafeYAML.load_file(path)
|
69
67
|
end
|
data/lib/jekyll/site.rb
CHANGED
@@ -314,15 +314,15 @@ module Jekyll
|
|
314
314
|
#
|
315
315
|
# Returns an Array of Documents which should be written
|
316
316
|
def docs_to_write
|
317
|
-
|
317
|
+
documents.select(&:write?)
|
318
318
|
end
|
319
319
|
|
320
320
|
# Get all the documents
|
321
321
|
#
|
322
322
|
# Returns an Array of all Documents
|
323
323
|
def documents
|
324
|
-
collections.
|
325
|
-
|
324
|
+
collections.each_with_object(Set.new) do |(_, collection), set|
|
325
|
+
set.merge(collection.docs).merge(collection.files)
|
326
326
|
end.to_a
|
327
327
|
end
|
328
328
|
|
data/lib/jekyll/tags/include.rb
CHANGED
@@ -22,7 +22,7 @@ module Jekyll
|
|
22
22
|
!mx
|
23
23
|
|
24
24
|
FULL_VALID_SYNTAX = %r!\A\s*(?:#{VALID_SYNTAX}(?=\s|\z)\s*)*\z!
|
25
|
-
VALID_FILENAME_CHARS = %r!^[\w
|
25
|
+
VALID_FILENAME_CHARS = %r!^[\w/.\-()+~\#@]+$!
|
26
26
|
INVALID_SEQUENCES = %r![./]{2,}!
|
27
27
|
|
28
28
|
def initialize(tag_name, markup, tokens)
|
@@ -147,12 +147,17 @@ MSG
|
|
147
147
|
end
|
148
148
|
|
149
149
|
def add_include_to_dependency(site, path, context)
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
150
|
+
page = context.registers[:page]
|
151
|
+
return unless page
|
152
|
+
return unless page.key?("path")
|
153
|
+
|
154
|
+
absolute_path = \
|
155
|
+
if page["collection"]
|
156
|
+
site.in_source_dir(site.config["collections_dir"], page["path"])
|
157
|
+
else
|
158
|
+
site.in_source_dir(page["path"])
|
159
|
+
end
|
160
|
+
site.regenerator.add_dependency(absolute_path, path)
|
156
161
|
end
|
157
162
|
|
158
163
|
def load_cached_partial(path, context)
|
@@ -191,7 +196,7 @@ MSG
|
|
191
196
|
|
192
197
|
# This method allows to modify the file content by inheriting from the class.
|
193
198
|
def read_file(file, context)
|
194
|
-
File.read(file, file_read_opts(context))
|
199
|
+
File.read(file, **file_read_opts(context))
|
195
200
|
end
|
196
201
|
|
197
202
|
private
|
@@ -224,6 +229,7 @@ MSG
|
|
224
229
|
else
|
225
230
|
File.join(site.config["collections_dir"], page_payload["path"])
|
226
231
|
end
|
232
|
+
resource_path.sub!(%r!/#excerpt\z!, "")
|
227
233
|
site.in_source_dir File.dirname(resource_path)
|
228
234
|
end
|
229
235
|
end
|
data/lib/jekyll/theme.rb
CHANGED
@@ -56,12 +56,28 @@ module Jekyll
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def realpath_for(folder)
|
59
|
-
|
60
|
-
|
61
|
-
|
59
|
+
# This resolves all symlinks for the theme subfolder and then ensures
|
60
|
+
# that the directory remains inside the theme root. This prevents the
|
61
|
+
# use of symlinks for theme subfolders to escape the theme root.
|
62
|
+
# However, symlinks are allowed to point to other directories within the theme.
|
63
|
+
Jekyll.sanitized_path(root, File.realpath(Jekyll.sanitized_path(root, folder.to_s)))
|
64
|
+
rescue Errno::ENOENT, Errno::EACCES, Errno::ELOOP => e
|
65
|
+
log_realpath_exception(e, folder)
|
62
66
|
nil
|
63
67
|
end
|
64
68
|
|
69
|
+
def log_realpath_exception(err, folder)
|
70
|
+
return if err.is_a?(Errno::ENOENT)
|
71
|
+
|
72
|
+
case err
|
73
|
+
when Errno::EACCES
|
74
|
+
Jekyll.logger.error "Theme error:", "Directory '#{folder}' is not accessible."
|
75
|
+
when Errno::ELOOP
|
76
|
+
Jekyll.logger.error "Theme error:",
|
77
|
+
"Directory '#{folder}' includes a symbolic link loop."
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
65
81
|
def gemspec
|
66
82
|
@gemspec ||= Gem::Specification.find_by_name(name)
|
67
83
|
rescue Gem::LoadError
|
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.
|
4
|
+
version: 3.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Preston-Werner
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -94,20 +94,6 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '2.0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: kramdown
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '1.14'
|
104
|
-
type: :runtime
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '1.14'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
98
|
name: liquid
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,6 +170,26 @@ dependencies:
|
|
184
170
|
- - "~>"
|
185
171
|
- !ruby/object:Gem::Version
|
186
172
|
version: '1.0'
|
173
|
+
- !ruby/object:Gem::Dependency
|
174
|
+
name: kramdown
|
175
|
+
requirement: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '1.17'
|
180
|
+
- - "<"
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: '3'
|
183
|
+
type: :runtime
|
184
|
+
prerelease: false
|
185
|
+
version_requirements: !ruby/object:Gem::Requirement
|
186
|
+
requirements:
|
187
|
+
- - ">="
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '1.17'
|
190
|
+
- - "<"
|
191
|
+
- !ruby/object:Gem::Version
|
192
|
+
version: '3'
|
187
193
|
description: Jekyll is a simple, blog aware, static site generator.
|
188
194
|
email: tom@mojombo.com
|
189
195
|
executables:
|
@@ -210,6 +216,7 @@ files:
|
|
210
216
|
- lib/jekyll/commands/serve.rb
|
211
217
|
- lib/jekyll/commands/serve/live_reload_reactor.rb
|
212
218
|
- lib/jekyll/commands/serve/livereload_assets/livereload.js
|
219
|
+
- lib/jekyll/commands/serve/mime_types_charset.json
|
213
220
|
- lib/jekyll/commands/serve/servlet.rb
|
214
221
|
- lib/jekyll/commands/serve/websockets.rb
|
215
222
|
- lib/jekyll/configuration.rb
|
@@ -311,7 +318,7 @@ homepage: https://github.com/jekyll/jekyll
|
|
311
318
|
licenses:
|
312
319
|
- MIT
|
313
320
|
metadata: {}
|
314
|
-
post_install_message:
|
321
|
+
post_install_message:
|
315
322
|
rdoc_options:
|
316
323
|
- "--charset=UTF-8"
|
317
324
|
require_paths:
|
@@ -327,9 +334,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
327
334
|
- !ruby/object:Gem::Version
|
328
335
|
version: '0'
|
329
336
|
requirements: []
|
330
|
-
|
331
|
-
|
332
|
-
signing_key:
|
337
|
+
rubygems_version: 3.1.6
|
338
|
+
signing_key:
|
333
339
|
specification_version: 2
|
334
340
|
summary: A simple, blog aware, static site generator.
|
335
341
|
test_files: []
|