jekyll 1.0.2 → 1.0.3
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 +8 -8
- data/History.markdown +46 -0
- data/Rakefile +35 -1
- data/bin/jekyll +6 -4
- data/features/create_sites.feature +8 -8
- data/features/drafts.feature +3 -3
- data/features/embed_filters.feature +5 -5
- data/features/markdown.feature +2 -2
- data/features/pagination.feature +8 -8
- data/features/permalinks.feature +5 -5
- data/features/post_data.feature +23 -23
- data/features/site_configuration.feature +9 -9
- data/features/site_data.feature +14 -14
- data/features/step_definitions/jekyll_steps.rb +16 -27
- data/features/support/env.rb +11 -6
- data/jekyll.gemspec +7 -4
- data/lib/jekyll.rb +7 -2
- data/lib/jekyll/command.rb +3 -3
- data/lib/jekyll/commands/build.rb +5 -5
- data/lib/jekyll/commands/doctor.rb +2 -2
- data/lib/jekyll/commands/new.rb +8 -3
- data/lib/jekyll/configuration.rb +31 -6
- data/lib/jekyll/converters/markdown/maruku_parser.rb +11 -7
- data/lib/jekyll/convertible.rb +4 -7
- data/lib/jekyll/deprecator.rb +2 -2
- data/lib/jekyll/filters.rb +12 -2
- data/lib/jekyll/generators/pagination.rb +3 -2
- data/lib/jekyll/layout.rb +3 -0
- data/lib/jekyll/post.rb +1 -23
- data/lib/jekyll/related_posts.rb +58 -0
- data/lib/jekyll/site.rb +2 -4
- data/lib/jekyll/{logger.rb → stevenson.rb} +26 -12
- data/lib/jekyll/tags/gist.rb +13 -3
- data/lib/site_template/_layouts/default.html +1 -1
- data/lib/site_template/_layouts/post.html +1 -1
- data/lib/site_template/css/main.css +7 -7
- data/site/_includes/docs_contents.html +3 -0
- data/site/css/pygments.css +1 -1
- data/site/css/style.css +9 -2
- data/site/docs/deployment-methods.md +1 -1
- data/site/docs/frontmatter.md +10 -0
- data/site/docs/history.md +536 -0
- data/site/docs/installation.md +2 -4
- data/site/docs/migrations.md +57 -58
- data/site/docs/plugins.md +3 -0
- data/site/docs/posts.md +24 -2
- data/site/docs/templates.md +50 -3
- data/site/docs/upgrading.md +45 -29
- data/test/source/_layouts/default.html +1 -1
- data/test/test_configuration.rb +15 -3
- data/test/test_page.rb +1 -1
- data/test/test_pager.rb +7 -0
- data/test/test_post.rb +11 -11
- data/test/test_redcloth.rb +3 -3
- data/test/test_related_posts.rb +41 -0
- data/test/test_site.rb +6 -6
- data/test/test_tags.rb +40 -0
- metadata +9 -5
@@ -88,8 +88,8 @@ Feature: Site configuration
|
|
88
88
|
And I have a _posts directory
|
89
89
|
And I have the following posts:
|
90
90
|
| title | date | layout | content |
|
91
|
-
| entry1 | 12
|
92
|
-
| entry2 | 01
|
91
|
+
| entry1 | 2007-12-31 | post | content for entry1. |
|
92
|
+
| entry2 | 2020-01-31 | post | content for entry2. |
|
93
93
|
When I run jekyll
|
94
94
|
Then the _site directory should exist
|
95
95
|
And I should see "Page Layout: 1 on 2010-01-01" in "_site/index.html"
|
@@ -108,8 +108,8 @@ Feature: Site configuration
|
|
108
108
|
And I have a _posts directory
|
109
109
|
And I have the following posts:
|
110
110
|
| title | date | layout | content |
|
111
|
-
| entry1 | 12
|
112
|
-
| entry2 | 01
|
111
|
+
| entry1 | 2007-12-31 | post | content for entry1. |
|
112
|
+
| entry2 | 2020-01-31 | post | content for entry2. |
|
113
113
|
When I run jekyll
|
114
114
|
Then the _site directory should exist
|
115
115
|
And I should see "Page Layout: 2 on 2010-01-01" in "_site/index.html"
|
@@ -163,9 +163,9 @@ Feature: Site configuration
|
|
163
163
|
| limit_posts | 2 |
|
164
164
|
And I have the following posts:
|
165
165
|
| title | date | content |
|
166
|
-
| Apples |
|
167
|
-
| Oranges |
|
168
|
-
| Bananas |
|
166
|
+
| Apples | 2009-03-27 | An article about apples |
|
167
|
+
| Oranges | 2009-04-01 | An article about oranges |
|
168
|
+
| Bananas | 2009-04-05 | An article about bananas |
|
169
169
|
When I run jekyll
|
170
170
|
Then the _site directory should exist
|
171
171
|
And the "_site/2009/04/05/bananas.html" file should exist
|
@@ -197,8 +197,8 @@ Feature: Site configuration
|
|
197
197
|
And I have a _posts directory
|
198
198
|
And I have the following posts:
|
199
199
|
| title | date | layout | content |
|
200
|
-
| entry1 | 12
|
201
|
-
| entry2 | 01
|
200
|
+
| entry1 | 2007-12-31 | post | content for entry1. |
|
201
|
+
| entry2 | 2020-01-31 | post | content for entry2. |
|
202
202
|
When I run jekyll
|
203
203
|
Then the _site directory should exist
|
204
204
|
And I should see "Page Layout: 2 on 2010-01-01" in "_site/index.html"
|
data/features/site_data.feature
CHANGED
@@ -39,9 +39,9 @@ Feature: Site data
|
|
39
39
|
And I have an "index.html" page that contains "{{ site.posts.first.title }}: {{ site.posts.first.url }}"
|
40
40
|
And I have the following posts:
|
41
41
|
| title | date | content |
|
42
|
-
| First Post |
|
43
|
-
| Second Post |
|
44
|
-
| Third Post |
|
42
|
+
| First Post | 2009-03-25 | My First Post |
|
43
|
+
| Second Post | 2009-03-26 | My Second Post |
|
44
|
+
| Third Post | 2009-03-27 | My Third Post |
|
45
45
|
When I run jekyll
|
46
46
|
Then the _site directory should exist
|
47
47
|
And I should see "Third Post: /2009/03/27/third-post.html" in "_site/index.html"
|
@@ -51,9 +51,9 @@ Feature: Site data
|
|
51
51
|
And I have an "index.html" page that contains "{% for post in site.posts %} {{ post.title }} {% endfor %}"
|
52
52
|
And I have the following posts:
|
53
53
|
| title | date | content |
|
54
|
-
| First Post |
|
55
|
-
| Second Post |
|
56
|
-
| Third Post |
|
54
|
+
| First Post | 2009-03-25 | My First Post |
|
55
|
+
| Second Post | 2009-03-26 | My Second Post |
|
56
|
+
| Third Post | 2009-03-27 | My Third Post |
|
57
57
|
When I run jekyll
|
58
58
|
Then the _site directory should exist
|
59
59
|
And I should see "Third Post Second Post First Post" in "_site/index.html"
|
@@ -63,8 +63,8 @@ Feature: Site data
|
|
63
63
|
And I have an "index.html" page that contains "{% for post in site.categories.code %} {{ post.title }} {% endfor %}"
|
64
64
|
And I have the following posts:
|
65
65
|
| title | date | category | content |
|
66
|
-
| Awesome Hack |
|
67
|
-
| Delicious Beer |
|
66
|
+
| Awesome Hack | 2009-03-26 | code | puts 'Hello World' |
|
67
|
+
| Delicious Beer | 2009-03-26 | food | 1) Yuengling |
|
68
68
|
When I run jekyll
|
69
69
|
Then the _site directory should exist
|
70
70
|
And I should see "Awesome Hack" in "_site/index.html"
|
@@ -74,7 +74,7 @@ Feature: Site data
|
|
74
74
|
And I have an "index.html" page that contains "{% for post in site.tags.beer %} {{ post.content }} {% endfor %}"
|
75
75
|
And I have the following posts:
|
76
76
|
| title | date | tag | content |
|
77
|
-
| Delicious Beer |
|
77
|
+
| Delicious Beer | 2009-03-26 | beer | 1) Yuengling |
|
78
78
|
When I run jekyll
|
79
79
|
Then the _site directory should exist
|
80
80
|
And I should see "Yuengling" in "_site/index.html"
|
@@ -84,11 +84,11 @@ Feature: Site data
|
|
84
84
|
And I have an "index.html" page that contains "{% for post in site.posts %}{{ post.title }}:{{ post.previous.title}},{{ post.next.title}} {% endfor %}"
|
85
85
|
And I have the following posts:
|
86
86
|
| title | date | content |
|
87
|
-
| first |
|
88
|
-
| A |
|
89
|
-
| B |
|
90
|
-
| C |
|
91
|
-
| last |
|
87
|
+
| first | 2009-02-26 | first |
|
88
|
+
| A | 2009-03-26 | A |
|
89
|
+
| B | 2009-03-26 | B |
|
90
|
+
| C | 2009-03-26 | C |
|
91
|
+
| last | 2009-04-26 | last |
|
92
92
|
When I run jekyll
|
93
93
|
Then the _site directory should exist
|
94
94
|
And I should see "last:C, C:B,last B:A,C A:first,B first:,A" in "_site/index.html"
|
@@ -47,44 +47,33 @@ Given /^I have an? (.*) directory$/ do |dir|
|
|
47
47
|
FileUtils.mkdir_p(dir)
|
48
48
|
end
|
49
49
|
|
50
|
-
Given /^I have the following (draft|post)s?(?: (
|
50
|
+
Given /^I have the following (draft|post)s?(?: (in|under) "([^"]+)")?:$/ do |status, direction, folder, table|
|
51
51
|
table.hashes.each do |post|
|
52
|
-
title = post['title']
|
53
|
-
|
54
|
-
if direction && direction == "in"
|
55
|
-
before = folder || '.'
|
56
|
-
elsif direction && direction == "under"
|
57
|
-
after = folder || '.'
|
58
|
-
end
|
59
|
-
|
52
|
+
title = slug(post['title'])
|
60
53
|
ext = post['type'] || 'textile'
|
54
|
+
before, after = location(folder, direction)
|
61
55
|
|
62
56
|
if "draft" == status
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
end
|
70
|
-
parsed_date = DateTime.strptime(post['date'], format)
|
71
|
-
post['date'] = parsed_date.to_s
|
72
|
-
date = parsed_date.strftime('%Y-%m-%d')
|
73
|
-
path = File.join(before || '.', '_posts', after || '.', "#{date}-#{title}.#{ext}")
|
57
|
+
folder_post = '_drafts'
|
58
|
+
filename = "#{title}.#{ext}"
|
59
|
+
elsif "post" == status
|
60
|
+
parsed_date = Time.xmlschema(post['date']) rescue Time.parse(post['date'])
|
61
|
+
folder_post = '_posts'
|
62
|
+
filename = "#{parsed_date.strftime('%Y-%m-%d')}-#{title}.#{ext}"
|
74
63
|
end
|
75
64
|
|
65
|
+
path = File.join(before, folder_post, after, filename)
|
66
|
+
|
76
67
|
matter_hash = {}
|
77
|
-
%w(title layout tag tags category categories published author path).each do |key|
|
68
|
+
%w(title layout tag tags category categories published author path date).each do |key|
|
78
69
|
matter_hash[key] = post[key] if post[key]
|
79
70
|
end
|
80
|
-
if "post" == status
|
81
|
-
matter_hash["date"] = post["date"] if post["date"]
|
82
|
-
end
|
83
71
|
matter = matter_hash.map { |k, v| "#{k}: #{v}\n" }.join.chomp
|
84
72
|
|
85
|
-
content = post['
|
86
|
-
|
87
|
-
|
73
|
+
content = if post['input'] && post['filter']
|
74
|
+
"{{ #{post['input']} | #{post['filter']} }}"
|
75
|
+
else
|
76
|
+
post['content']
|
88
77
|
end
|
89
78
|
|
90
79
|
File.open(path, 'w') do |f|
|
data/features/support/env.rb
CHANGED
@@ -1,10 +1,7 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
require 'rr'
|
3
3
|
require 'test/unit'
|
4
|
-
|
5
|
-
World do
|
6
|
-
include Test::Unit::Assertions
|
7
|
-
end
|
4
|
+
require 'time'
|
8
5
|
|
9
6
|
TEST_DIR = File.join('/', 'tmp', 'jekyll')
|
10
7
|
JEKYLL_PATH = File.join(File.dirname(__FILE__), '..', '..', 'bin', 'jekyll')
|
@@ -17,8 +14,16 @@ def run_jekyll(opts = {})
|
|
17
14
|
system command
|
18
15
|
end
|
19
16
|
|
20
|
-
def
|
21
|
-
|
17
|
+
def slug(title)
|
18
|
+
title.downcase.gsub(/[^\w]/, " ").strip.gsub(/\s+/, '-')
|
19
|
+
end
|
20
|
+
|
21
|
+
def location(folder, direction)
|
22
|
+
if folder
|
23
|
+
before = folder if direction == "in"
|
24
|
+
after = folder if direction == "under"
|
25
|
+
end
|
26
|
+
[before || '.', after || '.']
|
22
27
|
end
|
23
28
|
|
24
29
|
# work around "invalid option: --format" cucumber bug (see #296)
|
data/jekyll.gemspec
CHANGED
@@ -4,9 +4,9 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.rubygems_version = '1.3.5'
|
5
5
|
|
6
6
|
s.name = 'jekyll'
|
7
|
-
s.version = '1.0.
|
7
|
+
s.version = '1.0.3'
|
8
8
|
s.license = 'MIT'
|
9
|
-
s.date = '2013-
|
9
|
+
s.date = '2013-06-07'
|
10
10
|
s.rubyforge_project = 'jekyll'
|
11
11
|
|
12
12
|
s.summary = "A simple, blog aware, static site generator."
|
@@ -37,7 +37,7 @@ Gem::Specification.new do |s|
|
|
37
37
|
s.add_development_dependency('rdoc', "~> 3.11")
|
38
38
|
s.add_development_dependency('redgreen', "~> 1.2")
|
39
39
|
s.add_development_dependency('shoulda', "~> 3.3.2")
|
40
|
-
s.add_development_dependency('rr', "~> 1.0")
|
40
|
+
s.add_development_dependency('rr', "~> 1.0.0")
|
41
41
|
s.add_development_dependency('cucumber', "~> 1.2.1", '!= 1.2.4')
|
42
42
|
s.add_development_dependency('RedCloth', "~> 4.2")
|
43
43
|
s.add_development_dependency('rdiscount', "~> 1.6")
|
@@ -92,13 +92,14 @@ Gem::Specification.new do |s|
|
|
92
92
|
lib/jekyll/generator.rb
|
93
93
|
lib/jekyll/generators/pagination.rb
|
94
94
|
lib/jekyll/layout.rb
|
95
|
-
lib/jekyll/logger.rb
|
96
95
|
lib/jekyll/mime.types
|
97
96
|
lib/jekyll/page.rb
|
98
97
|
lib/jekyll/plugin.rb
|
99
98
|
lib/jekyll/post.rb
|
99
|
+
lib/jekyll/related_posts.rb
|
100
100
|
lib/jekyll/site.rb
|
101
101
|
lib/jekyll/static_file.rb
|
102
|
+
lib/jekyll/stevenson.rb
|
102
103
|
lib/jekyll/tags/gist.rb
|
103
104
|
lib/jekyll/tags/highlight.rb
|
104
105
|
lib/jekyll/tags/include.rb
|
@@ -137,6 +138,7 @@ Gem::Specification.new do |s|
|
|
137
138
|
site/docs/frontmatter.md
|
138
139
|
site/docs/github-pages.md
|
139
140
|
site/docs/heroku.md
|
141
|
+
site/docs/history.md
|
140
142
|
site/docs/index.md
|
141
143
|
site/docs/installation.md
|
142
144
|
site/docs/migrations.md
|
@@ -235,6 +237,7 @@ Gem::Specification.new do |s|
|
|
235
237
|
test/test_rdiscount.rb
|
236
238
|
test/test_redcarpet.rb
|
237
239
|
test/test_redcloth.rb
|
240
|
+
test/test_related_posts.rb
|
238
241
|
test/test_site.rb
|
239
242
|
test/test_tags.rb
|
240
243
|
]
|
data/lib/jekyll.rb
CHANGED
@@ -28,7 +28,7 @@ require 'colorator'
|
|
28
28
|
|
29
29
|
# internal requires
|
30
30
|
require 'jekyll/core_ext'
|
31
|
-
require 'jekyll/
|
31
|
+
require 'jekyll/stevenson'
|
32
32
|
require 'jekyll/deprecator'
|
33
33
|
require 'jekyll/configuration'
|
34
34
|
require 'jekyll/site'
|
@@ -40,6 +40,7 @@ require 'jekyll/draft'
|
|
40
40
|
require 'jekyll/filters'
|
41
41
|
require 'jekyll/static_file'
|
42
42
|
require 'jekyll/errors'
|
43
|
+
require 'jekyll/related_posts'
|
43
44
|
|
44
45
|
# extensions
|
45
46
|
require 'jekyll/plugin'
|
@@ -56,7 +57,7 @@ require_all 'jekyll/tags'
|
|
56
57
|
SafeYAML::OPTIONS[:suppress_warnings] = true
|
57
58
|
|
58
59
|
module Jekyll
|
59
|
-
VERSION = '1.0.
|
60
|
+
VERSION = '1.0.3'
|
60
61
|
|
61
62
|
# Public: Generate a Jekyll configuration Hash by merging the default
|
62
63
|
# options with anything in _config.yml, and adding the given options on top.
|
@@ -86,4 +87,8 @@ module Jekyll
|
|
86
87
|
def self.set_timezone(timezone)
|
87
88
|
ENV['TZ'] = timezone
|
88
89
|
end
|
90
|
+
|
91
|
+
def self.logger
|
92
|
+
@logger ||= Stevenson.new
|
93
|
+
end
|
89
94
|
end
|
data/lib/jekyll/command.rb
CHANGED
@@ -18,9 +18,9 @@ module Jekyll
|
|
18
18
|
site.process
|
19
19
|
rescue Jekyll::FatalException => e
|
20
20
|
puts
|
21
|
-
Jekyll
|
22
|
-
Jekyll
|
23
|
-
Jekyll
|
21
|
+
Jekyll.logger.error "ERROR:", "YOUR SITE COULD NOT BE BUILT:"
|
22
|
+
Jekyll.logger.error "", "------------------------------------"
|
23
|
+
Jekyll.logger.error "", e.message
|
24
24
|
exit(1)
|
25
25
|
end
|
26
26
|
end
|
@@ -17,9 +17,9 @@ module Jekyll
|
|
17
17
|
def self.build(site, options)
|
18
18
|
source = options['source']
|
19
19
|
destination = options['destination']
|
20
|
-
Jekyll
|
21
|
-
Jekyll
|
22
|
-
print Jekyll
|
20
|
+
Jekyll.logger.info "Source:", source
|
21
|
+
Jekyll.logger.info "Destination:", destination
|
22
|
+
print Jekyll.logger.formatted_topic "Generating..."
|
23
23
|
self.process_site(site)
|
24
24
|
puts "done."
|
25
25
|
end
|
@@ -36,14 +36,14 @@ module Jekyll
|
|
36
36
|
source = options['source']
|
37
37
|
destination = options['destination']
|
38
38
|
|
39
|
-
Jekyll
|
39
|
+
Jekyll.logger.info "Auto-regeneration:", "enabled"
|
40
40
|
|
41
41
|
dw = DirectoryWatcher.new(source, :glob => self.globs(source, destination), :pre_load => true)
|
42
42
|
dw.interval = 1
|
43
43
|
|
44
44
|
dw.add_observer do |*args|
|
45
45
|
t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
46
|
-
print Jekyll
|
46
|
+
print Jekyll.logger.formatted_topic("Regenerating:") + "#{args.size} files at #{t} "
|
47
47
|
self.process_site(site)
|
48
48
|
puts "...done."
|
49
49
|
end
|
@@ -7,7 +7,7 @@ module Jekyll
|
|
7
7
|
site.read
|
8
8
|
|
9
9
|
unless deprecated_relative_permalinks(site)
|
10
|
-
Jekyll
|
10
|
+
Jekyll.logger.info "Your test results", "are in. Everything looks fine."
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
@@ -15,7 +15,7 @@ module Jekyll
|
|
15
15
|
contains_deprecated_pages = false
|
16
16
|
site.pages.each do |page|
|
17
17
|
if page.uses_relative_permalinks
|
18
|
-
Jekyll
|
18
|
+
Jekyll.logger.warn "Deprecation:", "'#{page.path}' uses relative" +
|
19
19
|
" permalinks which will be deprecated in" +
|
20
20
|
" Jekyll v1.1 and beyond."
|
21
21
|
contains_deprecated_pages = true
|
data/lib/jekyll/commands/new.rb
CHANGED
@@ -3,13 +3,13 @@ require 'erb'
|
|
3
3
|
module Jekyll
|
4
4
|
module Commands
|
5
5
|
class New < Command
|
6
|
-
def self.process(args)
|
6
|
+
def self.process(args, options = {})
|
7
7
|
raise ArgumentError.new('You must specify a path.') if args.empty?
|
8
8
|
|
9
9
|
new_blog_path = File.expand_path(args.join(" "), Dir.pwd)
|
10
10
|
FileUtils.mkdir_p new_blog_path
|
11
|
-
|
12
|
-
Jekyll
|
11
|
+
if preserve_source_location?(new_blog_path, options)
|
12
|
+
Jekyll.logger.error "Conflict:", "#{new_blog_path} exists and is not empty."
|
13
13
|
exit(1)
|
14
14
|
end
|
15
15
|
|
@@ -33,6 +33,11 @@ module Jekyll
|
|
33
33
|
end
|
34
34
|
|
35
35
|
private
|
36
|
+
|
37
|
+
def self.preserve_source_location?(path, options)
|
38
|
+
!options[:force] && !Dir["#{path}/**/*"].empty?
|
39
|
+
end
|
40
|
+
|
36
41
|
def self.create_sample_files(path)
|
37
42
|
FileUtils.cp_r site_template + '/.', path
|
38
43
|
FileUtils.rm File.expand_path(scaffold_path, path)
|
data/lib/jekyll/configuration.rb
CHANGED
@@ -115,7 +115,7 @@ module Jekyll
|
|
115
115
|
def read_config_file(file)
|
116
116
|
next_config = YAML.safe_load_file(file)
|
117
117
|
raise "Configuration file: (INVALID) #{file}".yellow if !next_config.is_a?(Hash)
|
118
|
-
Jekyll
|
118
|
+
Jekyll.logger.info "Configuration file:", file
|
119
119
|
next_config
|
120
120
|
end
|
121
121
|
|
@@ -135,9 +135,9 @@ module Jekyll
|
|
135
135
|
end
|
136
136
|
rescue SystemCallError
|
137
137
|
# Errno:ENOENT = file not found
|
138
|
-
Jekyll
|
138
|
+
Jekyll.logger.warn "Configuration file:", "none"
|
139
139
|
rescue => err
|
140
|
-
Jekyll
|
140
|
+
Jekyll.logger.warn "WARNING:", "Error reading configuration. " +
|
141
141
|
"Using defaults (and options)."
|
142
142
|
$stderr.puts "#{err}"
|
143
143
|
end
|
@@ -145,6 +145,15 @@ module Jekyll
|
|
145
145
|
configuration.backwards_compatibilize
|
146
146
|
end
|
147
147
|
|
148
|
+
# Public: Split a CSV string into an array containing its values
|
149
|
+
#
|
150
|
+
# csv - the string of comma-separated values
|
151
|
+
#
|
152
|
+
# Returns an array of the values contained in the CSV
|
153
|
+
def csv_to_array(csv)
|
154
|
+
csv.split(",").map(&:strip)
|
155
|
+
end
|
156
|
+
|
148
157
|
# Public: Ensure the proper options are set in the configuration to allow for
|
149
158
|
# backwards-compatibility with Jekyll pre-1.0
|
150
159
|
#
|
@@ -153,7 +162,7 @@ module Jekyll
|
|
153
162
|
config = clone
|
154
163
|
# Provide backwards-compatibility
|
155
164
|
if config.has_key?('auto') || config.has_key?('watch')
|
156
|
-
Jekyll
|
165
|
+
Jekyll.logger.warn "Deprecation:", "Auto-regeneration can no longer" +
|
157
166
|
" be set from your configuration file(s). Use the"+
|
158
167
|
" --watch/-w command-line option instead."
|
159
168
|
config.delete('auto')
|
@@ -161,14 +170,14 @@ module Jekyll
|
|
161
170
|
end
|
162
171
|
|
163
172
|
if config.has_key? 'server'
|
164
|
-
Jekyll
|
173
|
+
Jekyll.logger.warn "Deprecation:", "The 'server' configuration option" +
|
165
174
|
" is no longer accepted. Use the 'jekyll serve'" +
|
166
175
|
" subcommand to serve your site with WEBrick."
|
167
176
|
config.delete('server')
|
168
177
|
end
|
169
178
|
|
170
179
|
if config.has_key? 'server_port'
|
171
|
-
Jekyll
|
180
|
+
Jekyll.logger.warn "Deprecation:", "The 'server_port' configuration option" +
|
172
181
|
" has been renamed to 'port'. Please update your config" +
|
173
182
|
" file accordingly."
|
174
183
|
# copy but don't overwrite:
|
@@ -176,6 +185,22 @@ module Jekyll
|
|
176
185
|
config.delete('server_port')
|
177
186
|
end
|
178
187
|
|
188
|
+
if config.has_key?('exclude') && config['exclude'].is_a?(String)
|
189
|
+
Jekyll.logger.warn "Deprecation:", "The 'exclude' configuration option" +
|
190
|
+
" must now be specified as an array, but you specified" +
|
191
|
+
" a string. For now, we've treated the string you provided" +
|
192
|
+
" as a list of comma-separated values."
|
193
|
+
config['exclude'] = csv_to_array(config['exclude'])
|
194
|
+
end
|
195
|
+
|
196
|
+
if config.has_key?('include') && config['include'].is_a?(String)
|
197
|
+
Jekyll.logger.warn "Deprecation:", "The 'include' configuration option" +
|
198
|
+
" must now be specified as an array, but you specified" +
|
199
|
+
" a string. For now, we've treated the string you provided" +
|
200
|
+
" as a list of comma-separated values."
|
201
|
+
config['include'] = csv_to_array(config['include'])
|
202
|
+
end
|
203
|
+
|
179
204
|
config
|
180
205
|
end
|
181
206
|
|