jekyll 3.5.2 → 3.6.0.pre.beta1
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/.rubocop.yml +4 -0
- data/README.markdown +5 -3
- data/exe/jekyll +3 -1
- data/lib/jekyll.rb +7 -4
- data/lib/jekyll/cleaner.rb +2 -0
- data/lib/jekyll/collection.rb +2 -0
- data/lib/jekyll/command.rb +2 -0
- data/lib/jekyll/commands/build.rb +2 -0
- data/lib/jekyll/commands/clean.rb +2 -0
- data/lib/jekyll/commands/doctor.rb +37 -0
- data/lib/jekyll/commands/help.rb +2 -0
- data/lib/jekyll/commands/new.rb +5 -3
- data/lib/jekyll/commands/new_theme.rb +2 -0
- data/lib/jekyll/commands/serve.rb +3 -1
- data/lib/jekyll/commands/serve/servlet.rb +3 -1
- data/lib/jekyll/configuration.rb +2 -1
- data/lib/jekyll/converter.rb +2 -0
- data/lib/jekyll/converters/identity.rb +2 -0
- data/lib/jekyll/converters/markdown.rb +2 -0
- data/lib/jekyll/converters/markdown/rdiscount_parser.rb +2 -0
- data/lib/jekyll/converters/markdown/redcarpet_parser.rb +4 -4
- data/lib/jekyll/converters/smartypants.rb +2 -0
- data/lib/jekyll/convertible.rb +1 -0
- data/lib/jekyll/deprecator.rb +3 -2
- data/lib/jekyll/document.rb +1 -0
- data/lib/jekyll/drops/collection_drop.rb +1 -0
- data/lib/jekyll/drops/document_drop.rb +1 -0
- data/lib/jekyll/drops/drop.rb +1 -0
- data/lib/jekyll/drops/excerpt_drop.rb +1 -0
- data/lib/jekyll/drops/jekyll_drop.rb +1 -0
- data/lib/jekyll/drops/site_drop.rb +4 -0
- data/lib/jekyll/drops/static_file_drop.rb +2 -0
- data/lib/jekyll/drops/unified_payload_drop.rb +1 -0
- data/lib/jekyll/drops/url_drop.rb +1 -0
- data/lib/jekyll/entry_filter.rb +2 -0
- data/lib/jekyll/errors.rb +2 -0
- data/lib/jekyll/excerpt.rb +3 -1
- data/lib/jekyll/external.rb +2 -0
- data/lib/jekyll/filters.rb +2 -0
- data/lib/jekyll/filters/grouping_filters.rb +2 -0
- data/lib/jekyll/filters/url_filters.rb +3 -1
- data/lib/jekyll/frontmatter_defaults.rb +2 -0
- data/lib/jekyll/generator.rb +2 -0
- data/lib/jekyll/hooks.rb +2 -0
- data/lib/jekyll/layout.rb +2 -0
- data/lib/jekyll/liquid_extensions.rb +2 -0
- data/lib/jekyll/liquid_renderer.rb +2 -3
- data/lib/jekyll/liquid_renderer/file.rb +2 -0
- data/lib/jekyll/liquid_renderer/table.rb +5 -3
- data/lib/jekyll/log_adapter.rb +49 -17
- data/lib/jekyll/page.rb +2 -0
- data/lib/jekyll/plugin.rb +2 -0
- data/lib/jekyll/plugin_manager.rb +2 -0
- data/lib/jekyll/publisher.rb +2 -0
- data/lib/jekyll/reader.rb +1 -0
- data/lib/jekyll/readers/collection_reader.rb +2 -0
- data/lib/jekyll/readers/data_reader.rb +4 -2
- data/lib/jekyll/readers/layout_reader.rb +2 -0
- data/lib/jekyll/readers/page_reader.rb +2 -0
- data/lib/jekyll/readers/post_reader.rb +2 -0
- data/lib/jekyll/readers/static_file_reader.rb +2 -0
- data/lib/jekyll/readers/theme_assets_reader.rb +2 -0
- data/lib/jekyll/regenerator.rb +2 -0
- data/lib/jekyll/related_posts.rb +2 -0
- data/lib/jekyll/renderer.rb +1 -0
- data/lib/jekyll/site.rb +3 -4
- data/lib/jekyll/static_file.rb +2 -0
- data/lib/jekyll/stevenson.rb +2 -0
- data/lib/jekyll/tags/highlight.rb +7 -3
- data/lib/jekyll/tags/include.rb +12 -3
- data/lib/jekyll/tags/link.rb +2 -0
- data/lib/jekyll/tags/post_url.rb +2 -0
- data/lib/jekyll/theme.rb +2 -0
- data/lib/jekyll/theme_builder.rb +2 -0
- data/lib/jekyll/url.rb +3 -1
- data/lib/jekyll/utils.rb +7 -1
- data/lib/jekyll/utils/exec.rb +2 -0
- data/lib/jekyll/utils/platforms.rb +2 -0
- data/lib/jekyll/utils/rouge.rb +21 -0
- data/lib/jekyll/utils/win_tz.rb +2 -0
- data/lib/jekyll/version.rb +3 -1
- data/lib/site_template/_config.yml +1 -1
- data/lib/theme_template/Gemfile +2 -0
- data/lib/theme_template/README.md.erb +7 -3
- metadata +16 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d76285f73396d2606fd208d2d5312ce9e476fa58
|
4
|
+
data.tar.gz: 4322fc510b5b61eb60c0a77c19a9f64b2467b6f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46e578f29d339fd9703380e41b59396efd324f5e6ea29e8ff0a2f2b2632bb4285c5ed81d4dc64c3b9d4669390187f41c5ae07e85803119e0d18b0443757db394
|
7
|
+
data.tar.gz: a4013df1019299b04bf63597654eb1d06305b63eaf7ab3785a6b585f2606b6d0477e902e91aea0d3f060c198655b0384bcdde9891c6b769c79c93a40f40a2a44
|
data/.rubocop.yml
CHANGED
@@ -9,6 +9,7 @@ AllCops:
|
|
9
9
|
- benchmark/**/*
|
10
10
|
- script/**/*
|
11
11
|
- vendor/**/*
|
12
|
+
- tmp/**/*
|
12
13
|
Layout/AlignArray:
|
13
14
|
Enabled: false
|
14
15
|
Layout/AlignHash:
|
@@ -99,6 +100,9 @@ Style/BracesAroundHashParameters:
|
|
99
100
|
Enabled: false
|
100
101
|
Style/ClassAndModuleChildren:
|
101
102
|
Enabled: false
|
103
|
+
Style/FrozenStringLiteralComment:
|
104
|
+
Enabled: true
|
105
|
+
EnforcedStyle: always
|
102
106
|
Style/Documentation:
|
103
107
|
Enabled: false
|
104
108
|
Exclude:
|
data/README.markdown
CHANGED
@@ -22,7 +22,9 @@ Jekyll is a simple, blog-aware, static site generator perfect for personal, proj
|
|
22
22
|
|
23
23
|
Jekyll does what you tell it to do — no more, no less. It doesn't try to outsmart users by making bold assumptions, nor does it burden them with needless complexity and configuration. Put simply, Jekyll gets out of your way and allows you to concentrate on what truly matters: your content.
|
24
24
|
|
25
|
-
|
25
|
+
See: https://jekyllrb.com/philosophy
|
26
|
+
|
27
|
+
## Having trouble?
|
26
28
|
|
27
29
|
See: https://jekyllrb.com/docs/troubleshooting/
|
28
30
|
|
@@ -37,13 +39,13 @@ See: https://jekyllrb.com/docs/troubleshooting/
|
|
37
39
|
## Code of Conduct
|
38
40
|
|
39
41
|
In order to have a more open and welcoming community, Jekyll adheres to a
|
40
|
-
[code of conduct](
|
42
|
+
[code of conduct](CODE_OF_CONDUCT.markdown) adapted from the Ruby on Rails code of
|
41
43
|
conduct.
|
42
44
|
|
43
45
|
Please adhere to this code of conduct in any interactions you have in the
|
44
46
|
Jekyll community. It is strictly enforced on all official Jekyll
|
45
47
|
repositories, websites, and resources. If you encounter someone violating
|
46
|
-
these terms, please let a
|
48
|
+
these terms, please let a [team captain](https://github.com/orgs/jekyll/teams/affinity-team-captains/members) know and we will address it as soon as possible.
|
47
49
|
|
48
50
|
## Diving In
|
49
51
|
|
data/exe/jekyll
CHANGED
data/lib/jekyll.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift __dir__ # For use/testing when no gem is installed
|
2
4
|
|
3
5
|
# Require all of the Ruby files in the given directory.
|
4
6
|
#
|
@@ -6,7 +8,7 @@ $LOAD_PATH.unshift File.dirname(__FILE__) # For use/testing when no gem is insta
|
|
6
8
|
#
|
7
9
|
# Returns nothing.
|
8
10
|
def require_all(path)
|
9
|
-
glob = File.join(
|
11
|
+
glob = File.join(__dir__, path, "*.rb")
|
10
12
|
Dir[glob].sort.each do |f|
|
11
13
|
require f
|
12
14
|
end
|
@@ -162,8 +164,9 @@ module Jekyll
|
|
162
164
|
def sanitized_path(base_directory, questionable_path)
|
163
165
|
return base_directory if base_directory.eql?(questionable_path)
|
164
166
|
|
165
|
-
|
166
|
-
clean_path
|
167
|
+
clean_path = questionable_path.dup
|
168
|
+
clean_path.insert(0, "/") if clean_path.start_with?("~")
|
169
|
+
clean_path = File.expand_path(clean_path, "/")
|
167
170
|
|
168
171
|
return clean_path if clean_path.eql?(base_directory)
|
169
172
|
|
data/lib/jekyll/cleaner.rb
CHANGED
data/lib/jekyll/collection.rb
CHANGED
data/lib/jekyll/command.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "addressable/uri"
|
4
|
+
|
1
5
|
module Jekyll
|
2
6
|
module Commands
|
3
7
|
class Doctor < Command
|
@@ -36,6 +40,7 @@ module Jekyll
|
|
36
40
|
!deprecated_relative_permalinks(site),
|
37
41
|
!conflicting_urls(site),
|
38
42
|
!urls_only_differ_by_case(site),
|
43
|
+
proper_site_url?(site),
|
39
44
|
].all?
|
40
45
|
end
|
41
46
|
|
@@ -91,6 +96,15 @@ module Jekyll
|
|
91
96
|
urls_only_differ_by_case
|
92
97
|
end
|
93
98
|
|
99
|
+
def proper_site_url?(site)
|
100
|
+
url = site.config["url"]
|
101
|
+
[
|
102
|
+
url_exists?(url),
|
103
|
+
url_valid?(url),
|
104
|
+
url_absolute(url),
|
105
|
+
].all?
|
106
|
+
end
|
107
|
+
|
94
108
|
private
|
95
109
|
def collect_urls(urls, things, destination)
|
96
110
|
things.each do |thing|
|
@@ -110,6 +124,29 @@ module Jekyll
|
|
110
124
|
(memo[dest.downcase] ||= []) << dest
|
111
125
|
end
|
112
126
|
end
|
127
|
+
|
128
|
+
def url_exists?(url)
|
129
|
+
return true unless url.nil? || url.empty?
|
130
|
+
Jekyll.logger.warn "Warning:", "You didn't set an URL in the config file, "\
|
131
|
+
"you may encounter problems with some plugins."
|
132
|
+
false
|
133
|
+
end
|
134
|
+
|
135
|
+
def url_valid?(url)
|
136
|
+
Addressable::URI.parse(url)
|
137
|
+
true
|
138
|
+
rescue
|
139
|
+
Jekyll.logger.warn "Warning:", "The site URL does not seem to be valid, "\
|
140
|
+
"check the value of `url` in your config file."
|
141
|
+
false
|
142
|
+
end
|
143
|
+
|
144
|
+
def url_absolute(url)
|
145
|
+
return true if Addressable::URI.parse(url).absolute?
|
146
|
+
Jekyll.logger.warn "Warning:", "Your site URL does not seem to be absolute, "\
|
147
|
+
"check the value of `url` in your config file."
|
148
|
+
false
|
149
|
+
end
|
113
150
|
end
|
114
151
|
end
|
115
152
|
end
|
data/lib/jekyll/commands/help.rb
CHANGED
data/lib/jekyll/commands/new.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "erb"
|
2
4
|
|
3
5
|
module Jekyll
|
@@ -70,7 +72,7 @@ source "https://rubygems.org"
|
|
70
72
|
#
|
71
73
|
# This will help ensure the proper Jekyll version is running.
|
72
74
|
# Happy Jekylling!
|
73
|
-
gem "jekyll", "#{Jekyll::VERSION}"
|
75
|
+
gem "jekyll", "~> #{Jekyll::VERSION}"
|
74
76
|
|
75
77
|
# This is the default theme for new Jekyll sites. You may change this to anything you like.
|
76
78
|
gem "minima", "~> 2.0"
|
@@ -81,7 +83,7 @@ gem "minima", "~> 2.0"
|
|
81
83
|
|
82
84
|
# If you have any plugins, put them here!
|
83
85
|
group :jekyll_plugins do
|
84
|
-
|
86
|
+
gem "jekyll-feed", "~> 0.6"
|
85
87
|
end
|
86
88
|
|
87
89
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
@@ -113,7 +115,7 @@ RUBY
|
|
113
115
|
end
|
114
116
|
|
115
117
|
def site_template
|
116
|
-
File.expand_path("../../site_template",
|
118
|
+
File.expand_path("../../site_template", __dir__)
|
117
119
|
end
|
118
120
|
|
119
121
|
def scaffold_path
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Jekyll
|
2
4
|
module Commands
|
3
5
|
class Serve < Command
|
@@ -234,7 +236,7 @@ module Jekyll
|
|
234
236
|
|
235
237
|
private
|
236
238
|
def mime_types
|
237
|
-
file = File.expand_path("../mime.types",
|
239
|
+
file = File.expand_path("../mime.types", __dir__)
|
238
240
|
WEBrick::HTTPUtils.load_mime_types(file)
|
239
241
|
end
|
240
242
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "webrick"
|
2
4
|
|
3
5
|
module Jekyll
|
@@ -22,7 +24,7 @@ module Jekyll
|
|
22
24
|
|
23
25
|
def search_file(req, res, basename)
|
24
26
|
# /file.* > /file/index.html > /file.html
|
25
|
-
super || super(req, res, "#{basename}.html")
|
27
|
+
super || super(req, res, ".html") || super(req, res, "#{basename}.html")
|
26
28
|
end
|
27
29
|
|
28
30
|
# rubocop:disable Style/MethodName
|
data/lib/jekyll/configuration.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# encoding: UTF-8
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
module Jekyll
|
4
5
|
class Configuration < Hash
|
@@ -155,7 +156,7 @@ module Jekyll
|
|
155
156
|
)
|
156
157
|
|
157
158
|
# Get configuration from <source>/_config.yml or <source>/<config_file>
|
158
|
-
config_files = override
|
159
|
+
config_files = override["config"]
|
159
160
|
if config_files.to_s.empty?
|
160
161
|
default = %w(yml yaml).find(-> { "yml" }) do |ext|
|
161
162
|
File.exist?(Jekyll.sanitized_path(source(override), "_config.#{ext}"))
|
data/lib/jekyll/converter.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class Jekyll::Converters::Markdown::RedcarpetParser
|
2
4
|
module CommonMethods
|
3
5
|
def add_code_tags(code, lang)
|
@@ -48,14 +50,12 @@ class Jekyll::Converters::Markdown::RedcarpetParser
|
|
48
50
|
def block_code(code, lang)
|
49
51
|
code = "<pre>#{super}</pre>"
|
50
52
|
|
51
|
-
|
52
|
-
output << add_code_tags(code, lang)
|
53
|
-
output << "</div>"
|
53
|
+
"<div class=\"highlight\">#{add_code_tags(code, lang)}</div>"
|
54
54
|
end
|
55
55
|
|
56
56
|
protected
|
57
57
|
def rouge_formatter(_lexer)
|
58
|
-
|
58
|
+
Jekyll::Utils::Rouge.html_formatter(:wrap => false)
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
data/lib/jekyll/convertible.rb
CHANGED
data/lib/jekyll/deprecator.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Jekyll
|
2
4
|
module Deprecator
|
3
5
|
extend self
|
@@ -5,7 +7,7 @@ module Jekyll
|
|
5
7
|
def process(args)
|
6
8
|
arg_is_present? args, "--server", "The --server command has been replaced by the \
|
7
9
|
'serve' subcommand."
|
8
|
-
arg_is_present? args, "--serve", "The --
|
10
|
+
arg_is_present? args, "--serve", "The --serve command has been replaced by the \
|
9
11
|
'serve' subcommand."
|
10
12
|
arg_is_present? args, "--no-server", "To build Jekyll without launching a server, \
|
11
13
|
use the 'build' subcommand."
|
@@ -46,6 +48,5 @@ module Jekyll
|
|
46
48
|
Jekyll.logger.warn "Defaults:", "Please update your front-matter defaults to use \
|
47
49
|
'type: #{current}'."
|
48
50
|
end
|
49
|
-
|
50
51
|
end
|
51
52
|
end
|
data/lib/jekyll/document.rb
CHANGED
data/lib/jekyll/drops/drop.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# encoding: UTF-8
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
module Jekyll
|
4
5
|
module Drops
|
@@ -37,6 +38,9 @@ module Jekyll
|
|
37
38
|
@site_collections ||= @obj.collections.values.sort_by(&:label).map(&:to_liquid)
|
38
39
|
end
|
39
40
|
|
41
|
+
# return nil for `{{ site.config }}` even if --config was passed via CLI
|
42
|
+
def config; end
|
43
|
+
|
40
44
|
private
|
41
45
|
def_delegator :@obj, :config, :fallback_data
|
42
46
|
end
|