jekyll 3.3.0 → 3.3.1
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 +5 -0
- data/lib/jekyll/commands/build.rb +19 -15
- data/lib/jekyll/configuration.rb +3 -1
- data/lib/jekyll/drops/url_drop.rb +5 -0
- data/lib/jekyll/entry_filter.rb +8 -9
- data/lib/jekyll/frontmatter_defaults.rb +1 -1
- data/lib/jekyll/readers/data_reader.rb +1 -2
- data/lib/jekyll/site.rb +0 -4
- data/lib/jekyll/url.rb +27 -5
- data/lib/jekyll/utils/platforms.rb +16 -3
- data/lib/jekyll/version.rb +1 -1
- data/lib/site_template/_config.yml +1 -1
- data/lib/theme_template/README.md.erb +1 -1
- data/lib/theme_template/theme.gemspec.erb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68bb27761f573ec04ae1397a773f64e1d8f4545e
|
4
|
+
data.tar.gz: bd8993ae63044fd48be9ff85bcb0ee5ff7c3dc4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcd138cfb2d0629a83d4b2c16c4fd9d4635cb053ba14302611820be25acef3a475e0956f65933eb4641133769d7e62abdecd60f11636a53f2b70aa945bb2d74d
|
7
|
+
data.tar.gz: 2addd77ace5a02fae654c07fcc2d2db6d993ac8036771333cbb023d68a09c622d6433a8aefc42d9ab69b57f0972d9f75c0118924a89b0b9bbbec2384827ab907
|
data/.rubocop.yml
CHANGED
@@ -6,6 +6,7 @@ AllCops:
|
|
6
6
|
Exclude:
|
7
7
|
- lib/jekyll/renderer.rb
|
8
8
|
- bin/**/*
|
9
|
+
- exe/**/*
|
9
10
|
- benchmark/**/*
|
10
11
|
- script/**/*
|
11
12
|
- vendor/**/*
|
@@ -17,6 +18,10 @@ Lint/UselessAccessModifier:
|
|
17
18
|
Enabled: false
|
18
19
|
Metrics/AbcSize:
|
19
20
|
Max: 21
|
21
|
+
Metrics/BlockLength:
|
22
|
+
Exclude:
|
23
|
+
- test/**/*.rb
|
24
|
+
- lib/jekyll/configuration.rb
|
20
25
|
Metrics/ClassLength:
|
21
26
|
Exclude:
|
22
27
|
- !ruby/regexp /features\/.*.rb$/
|
@@ -71,23 +71,27 @@ module Jekyll
|
|
71
71
|
#
|
72
72
|
# Returns nothing.
|
73
73
|
def watch(site, options)
|
74
|
-
|
75
|
-
|
76
|
-
Jekyll.logger.warn "",
|
77
|
-
"
|
74
|
+
# Warn Windows users that they might need to upgrade.
|
75
|
+
if Utils::Platforms.bash_on_windows?
|
76
|
+
Jekyll.logger.warn "",
|
77
|
+
"Auto-regeneration may not work on some Windows versions."
|
78
|
+
Jekyll.logger.warn "",
|
79
|
+
"Please see: https://github.com/Microsoft/BashOnWindows/issues/216"
|
80
|
+
Jekyll.logger.warn "",
|
81
|
+
"If it does not work, please upgrade Bash on Windows or "\
|
82
|
+
"run Jekyll with --no-watch."
|
83
|
+
end
|
78
84
|
|
85
|
+
External.require_with_graceful_fail "jekyll-watch"
|
86
|
+
watch_method = Jekyll::Watcher.method(:watch)
|
87
|
+
if watch_method.parameters.size == 1
|
88
|
+
watch_method.call(
|
89
|
+
options
|
90
|
+
)
|
79
91
|
else
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
watch_method.call(
|
84
|
-
options
|
85
|
-
)
|
86
|
-
else
|
87
|
-
watch_method.call(
|
88
|
-
options, site
|
89
|
-
)
|
90
|
-
end
|
92
|
+
watch_method.call(
|
93
|
+
options, site
|
94
|
+
)
|
91
95
|
end
|
92
96
|
end
|
93
97
|
end # end of class << self
|
data/lib/jekyll/configuration.rb
CHANGED
@@ -17,7 +17,9 @@ module Jekyll
|
|
17
17
|
# Handling Reading
|
18
18
|
"safe" => false,
|
19
19
|
"include" => [".htaccess"],
|
20
|
-
"exclude" => %w(
|
20
|
+
"exclude" => %w(
|
21
|
+
node_modules vendor/bundle/ vendor/cache/ vendor/gems/ vendor/ruby/
|
22
|
+
),
|
21
23
|
"keep_files" => [".git", ".svn"],
|
22
24
|
"encoding" => "utf-8",
|
23
25
|
"markdown_ext" => "markdown,mkdown,mkdn,mkd,md",
|
data/lib/jekyll/entry_filter.rb
CHANGED
@@ -36,8 +36,7 @@ module Jekyll
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def included?(entry)
|
39
|
-
glob_include?(site.include,
|
40
|
-
entry)
|
39
|
+
glob_include?(site.include, entry)
|
41
40
|
end
|
42
41
|
|
43
42
|
def special?(entry)
|
@@ -50,14 +49,14 @@ module Jekyll
|
|
50
49
|
end
|
51
50
|
|
52
51
|
def excluded?(entry)
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
52
|
+
glob_include?(site.exclude, relative_to_source(entry)).tap do |excluded|
|
53
|
+
if excluded
|
54
|
+
Jekyll.logger.debug(
|
55
|
+
"EntryFilter:",
|
56
|
+
"excluded #{relative_to_source(entry)}"
|
57
|
+
)
|
58
|
+
end
|
59
59
|
end
|
60
|
-
excluded
|
61
60
|
end
|
62
61
|
|
63
62
|
# --
|
data/lib/jekyll/site.rb
CHANGED
@@ -191,11 +191,7 @@ module Jekyll
|
|
191
191
|
render_pages(payload)
|
192
192
|
|
193
193
|
Jekyll::Hooks.trigger :site, :post_render, self, payload
|
194
|
-
# rubocop: disable HandleExceptions
|
195
|
-
rescue Errno::ENOENT
|
196
|
-
# ignore missing layout dir
|
197
194
|
end
|
198
|
-
# rubocop: enable HandleExceptions
|
199
195
|
|
200
196
|
# Remove orphaned files and empty directories in destination.
|
201
197
|
#
|
data/lib/jekyll/url.rb
CHANGED
@@ -84,14 +84,36 @@ module Jekyll
|
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
87
|
+
# We include underscores in keys to allow for 'i_month' and so forth.
|
88
|
+
# This poses a problem for keys which are followed by an underscore
|
89
|
+
# but the underscore is not part of the key, e.g. '/:month_:day'.
|
90
|
+
# That should be :month and :day, but our key extraction regexp isn't
|
91
|
+
# smart enough to know that so we have to make it an explicit
|
92
|
+
# possibility.
|
93
|
+
def possible_keys(key)
|
94
|
+
if key.end_with?("_")
|
95
|
+
[key, key.chomp("_")]
|
96
|
+
else
|
97
|
+
[key]
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
87
101
|
def generate_url_from_drop(template)
|
88
102
|
template.gsub(%r!:([a-z_]+)!) do |match|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
103
|
+
pool = possible_keys(match.sub(":".freeze, "".freeze))
|
104
|
+
|
105
|
+
winner = pool.find { |key| @placeholders.key?(key) }
|
106
|
+
if winner.nil?
|
107
|
+
raise NoMethodError,
|
108
|
+
"The URL template doesn't have #{pool.join(" or ")} keys. "\
|
109
|
+
"Check your permalink template!"
|
94
110
|
end
|
111
|
+
|
112
|
+
value = @placeholders[winner]
|
113
|
+
value = "" if value.nil?
|
114
|
+
replacement = self.class.escape_path(value)
|
115
|
+
|
116
|
+
match.sub(":#{winner}", replacement)
|
95
117
|
end.gsub(%r!//!, "/".freeze)
|
96
118
|
end
|
97
119
|
|
@@ -19,20 +19,33 @@ module Jekyll
|
|
19
19
|
# /proc/version returns nothing to us.
|
20
20
|
# --
|
21
21
|
|
22
|
-
def
|
22
|
+
def vanilla_windows?
|
23
23
|
RbConfig::CONFIG["host_os"] =~ %r!mswin|mingw|cygwin!i && \
|
24
24
|
!proc_version
|
25
25
|
end
|
26
26
|
|
27
|
+
# --
|
28
|
+
# XXX: Remove in 4.0
|
29
|
+
# --
|
30
|
+
|
31
|
+
alias_method :really_windows?, \
|
32
|
+
:vanilla_windows?
|
33
|
+
|
27
34
|
#
|
28
35
|
|
29
|
-
def
|
30
|
-
RbConfig::CONFIG["host_os"] =~ %r!
|
36
|
+
def bash_on_windows?
|
37
|
+
RbConfig::CONFIG["host_os"] =~ %r!linux! && \
|
31
38
|
proc_version =~ %r!microsoft!i
|
32
39
|
end
|
33
40
|
|
34
41
|
#
|
35
42
|
|
43
|
+
def windows?
|
44
|
+
vanilla_windows? || bash_on_windows?
|
45
|
+
end
|
46
|
+
|
47
|
+
#
|
48
|
+
|
36
49
|
def linux?
|
37
50
|
RbConfig::CONFIG["host_os"] =~ %r!linux! && \
|
38
51
|
proc_version !~ %r!microsoft!i
|
data/lib/jekyll/version.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#
|
3
3
|
# This config file is meant for settings that affect your whole blog, values
|
4
4
|
# which you are expected to set up once and rarely edit after that. If you find
|
5
|
-
# yourself editing
|
5
|
+
# yourself editing this file very often, consider using Jekyll's data files
|
6
6
|
# feature for the data you need to update frequently.
|
7
7
|
#
|
8
8
|
# For technical reasons, this file is *NOT* reloaded automatically when you use
|
@@ -38,7 +38,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERN
|
|
38
38
|
|
39
39
|
To set up your environment to develop this theme, run `bundle install`.
|
40
40
|
|
41
|
-
|
41
|
+
Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
|
42
42
|
|
43
43
|
When your theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.
|
44
44
|
|
@@ -12,7 +12,8 @@ Gem::Specification.new do |spec|
|
|
12
12
|
|
13
13
|
spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(<%= theme_directories.join("|") %>|LICENSE|README)}i) }
|
14
14
|
|
15
|
-
spec.
|
15
|
+
spec.add_runtime_dependency "jekyll", "~> <%= jekyll_version_with_minor %>"
|
16
|
+
|
16
17
|
spec.add_development_dependency "bundler", "~> 1.12"
|
17
18
|
spec.add_development_dependency "rake", "~> 10.0"
|
18
19
|
end
|
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.3.
|
4
|
+
version: 3.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Preston-Werner
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: liquid
|