jekyll 2.0.0.rc1 → 2.0.0
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/.travis.yml +1 -1
- data/History.markdown +40 -0
- data/README.markdown +3 -3
- data/features/collections.feature +24 -0
- data/features/embed_filters.feature +32 -0
- data/features/site_configuration.feature +9 -0
- data/features/step_definitions/jekyll_steps.rb +2 -2
- data/features/support/env.rb +5 -1
- data/jekyll.gemspec +3 -3
- data/lib/jekyll/commands/build.rb +3 -3
- data/lib/jekyll/commands/doctor.rb +1 -1
- data/lib/jekyll/commands/new.rb +1 -1
- data/lib/jekyll/commands/serve.rb +45 -23
- data/lib/jekyll/configuration.rb +1 -2
- data/lib/jekyll/converters/markdown/redcarpet_parser.rb +1 -1
- data/lib/jekyll/convertible.rb +2 -2
- data/lib/jekyll/document.rb +10 -0
- data/lib/jekyll/entry_filter.rb +1 -3
- data/lib/jekyll/filters.rb +34 -0
- data/lib/jekyll/post.rb +1 -0
- data/lib/jekyll/site.rb +9 -10
- data/lib/jekyll/stevenson.rb +23 -10
- data/lib/jekyll/tags/highlight.rb +24 -48
- data/lib/jekyll/utils.rb +10 -10
- data/lib/jekyll/version.rb +1 -1
- data/lib/site_template/_config.yml +9 -4
- data/lib/site_template/_includes/footer.html +9 -9
- data/lib/site_template/_includes/head.html +3 -3
- data/lib/site_template/_includes/header.html +5 -4
- data/lib/site_template/{about/index.md → about.md} +2 -1
- data/lib/site_template/css/main.css +6 -1
- data/lib/site_template/feed.xml +5 -5
- data/lib/site_template/index.html +6 -3
- data/site/_config.yml +1 -1
- data/site/_includes/css/style.css +180 -120
- data/site/_includes/footer.html +1 -1
- data/site/_includes/top.html +1 -1
- data/site/_posts/2014-05-06-jekyll-turns-2-0-0.markdown +31 -0
- data/site/docs/assets.md +0 -8
- data/site/docs/collections.md +11 -9
- data/site/docs/configuration.md +28 -10
- data/site/docs/deployment-methods.md +1 -1
- data/site/docs/history.md +227 -0
- data/site/docs/permalinks.md +8 -0
- data/site/docs/plugins.md +2 -1
- data/site/docs/templates.md +43 -0
- data/site/docs/variables.md +8 -3
- data/site/js/html5shiv.min.js +4 -0
- data/test/helper.rb +10 -0
- data/test/source/+/foo.md +1 -1
- data/test/test_collections.rb +2 -2
- data/test/test_configuration.rb +2 -2
- data/test/test_convertible.rb +3 -3
- data/test/test_entry_filter.rb +16 -0
- data/test/test_filters.rb +25 -0
- data/test/test_new_command.rb +1 -1
- data/test/test_redcarpet.rb +3 -3
- data/test/test_sass.rb +0 -41
- data/test/test_tags.rb +4 -4
- metadata +19 -19
- data/lib/site_template/projects/index.md +0 -14
- data/site/js/html5shiv.js +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f15afc62570e5e20a6a27553ca201e08ec8c9d69
|
4
|
+
data.tar.gz: 1a967f8aca5003083a4b9da5ba6a92d25dbf1ea7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1479bd3d893c58838172496863d3fdb58d48d9195270aa00445ad5d7895bd7622e9bf9ae4f42a35492be996c8f24de9f8bfe9f64148c10c055636992c210c8a
|
7
|
+
data.tar.gz: e3c5582546fcb711a2c9b5ee9c3c0a8611385fb96f4fad06199e52312bab2e124105782503243a4a744cd4dffca31ccc06a413336f892e95fbc345aafbd64979
|
data/.travis.yml
CHANGED
data/History.markdown
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
## HEAD
|
2
2
|
|
3
|
+
### Major Enhancements
|
4
|
+
|
5
|
+
### Minor Enhancements
|
6
|
+
|
7
|
+
### Bug Fixes
|
8
|
+
|
9
|
+
### Development Fixes
|
10
|
+
|
11
|
+
### Site Enhancements
|
12
|
+
|
13
|
+
## 2.0.0 / 2014-05-06
|
14
|
+
|
3
15
|
### Major Enhancements
|
4
16
|
* Add "Collections" feature (#2199)
|
5
17
|
* Add gem-based plugin whitelist to safe mode (#1657)
|
@@ -18,6 +30,8 @@
|
|
18
30
|
* Complete redesign of the template site generated by `jekyll new` (#2050)
|
19
31
|
* Update Listen from 1.x to 2.x (#2097)
|
20
32
|
* Front-matter defaults (#2205)
|
33
|
+
* Deprecate `relative_permalinks` configuration option (default to `false`) (#2307)
|
34
|
+
* Exclude files based on prefix as well as `fnmatch?` (#2303)
|
21
35
|
|
22
36
|
### Minor Enhancements
|
23
37
|
* Move the EntryFilter class into the Jekyll module to avoid polluting the
|
@@ -64,6 +78,12 @@
|
|
64
78
|
* Add the ability for pages to be marked as `published: false` (#1492)
|
65
79
|
* Add `Jekyll::LiquidExtensions` with `.lookup_variable` method for easy
|
66
80
|
looking up of variable values in a Liquid context. (#2253)
|
81
|
+
* Remove literal lang name from class (#2292)
|
82
|
+
* Return `utf-8` encoding in header for webrick error page response (#2289)
|
83
|
+
* Make template site easier to customize (#2268)
|
84
|
+
* Add two-digit year to permalink template option (#2301)
|
85
|
+
* Add `site.documents` to Liquid payload (list of all docs) (#2295)
|
86
|
+
* Take into account missing values in the Liquid sort filter (#2299)
|
67
87
|
|
68
88
|
### Bug Fixes
|
69
89
|
* Don't allow nil entries when loading posts (#1796)
|
@@ -95,6 +115,10 @@
|
|
95
115
|
* Load in `rouge` only when it's been requested as the highlighter (#2189)
|
96
116
|
* Convert input to string before XML escaping (`xml_escape` liquid filter) (#2244)
|
97
117
|
* Modify configuration key for Collections and reset properly. (#2238)
|
118
|
+
* Avoid duplicated output using `highlight` tag (#2264)
|
119
|
+
* Only use Jekyll.logger for output (#2307)
|
120
|
+
* Close the file descriptor in `has_yaml_header?` (#2310)
|
121
|
+
* Add `output` to `Document` liquid output hash (#2309)
|
98
122
|
|
99
123
|
### Development Fixes
|
100
124
|
* Add a link to the site in the README.md file (#1795)
|
@@ -126,6 +150,10 @@
|
|
126
150
|
* Add missing tests for `Command` (#2216)
|
127
151
|
* Update `rr` link in CONTRIBUTING doc (#2247)
|
128
152
|
* Streamline cucumber execution of `jekyll` subcommands (#2258)
|
153
|
+
* Refactor `Commands::Serve`. (#2269)
|
154
|
+
* Refactor `highlight` tag (#2154)
|
155
|
+
* Update `Util` hash functions with latest from Rails (#2273)
|
156
|
+
* Workaround for Travis bug (#2290)
|
129
157
|
|
130
158
|
### Site Enhancements
|
131
159
|
* Document Kramdown's GFM parser option (#1791)
|
@@ -196,6 +224,18 @@
|
|
196
224
|
* Add a cross-reference about `post_url` (#2243)
|
197
225
|
* Add `jekyll-live-tiles` to list of third-party plugins (#2250)
|
198
226
|
* Fixed broken link to GitHub training material site source (#2257)
|
227
|
+
* Update link to help repo, now called `jekyll-help` (#2277)
|
228
|
+
* Fix capitalization of 'Jekyll' on Deployment Methods page (#2291)
|
229
|
+
* Include plugins by sonnym in list of third-party plugins (#2297)
|
230
|
+
* Add deprecated articles keeper filter to list of third-party plugins (#2300)
|
231
|
+
* Simplify and improve our CSS. (#2127)
|
232
|
+
* Use black text color for the mobile navbar (#2306)
|
233
|
+
* Use the built in date filter and `site.time` for the copyright year. (#2305)
|
234
|
+
* Update html5shiv to v3.7.2 (#2304)
|
235
|
+
* Add 2.0.0 release post (#2298)
|
236
|
+
* Add docs for custom markdown processors (#2298)
|
237
|
+
* Add docs for `where` and `group_by` Liquid filters (#2298)
|
238
|
+
* Remove notes in docs for unreleased features (#2309)
|
199
239
|
|
200
240
|
## 1.5.1 / 2014-03-27
|
201
241
|
|
data/README.markdown
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# [Jekyll](http://jekyllrb.com/)
|
2
2
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/jekyll.
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/jekyll.svg)](http://badge.fury.io/rb/jekyll)
|
4
4
|
|
5
|
-
[![Build Status](https://secure.travis-ci.org/jekyll/jekyll.
|
5
|
+
[![Build Status](https://secure.travis-ci.org/jekyll/jekyll.svg?branch=master)](https://travis-ci.org/jekyll/jekyll)
|
6
6
|
[![Code Climate](https://codeclimate.com/github/jekyll/jekyll.png)](https://codeclimate.com/github/jekyll/jekyll)
|
7
|
-
[![Dependency Status](https://gemnasium.com/jekyll/jekyll.
|
7
|
+
[![Dependency Status](https://gemnasium.com/jekyll/jekyll.svg)](https://gemnasium.com/jekyll/jekyll)
|
8
8
|
[![Coverage Status](https://coveralls.io/repos/jekyll/jekyll/badge.png)](https://coveralls.io/r/jekyll/jekyll)
|
9
9
|
|
10
10
|
By Tom Preston-Werner, Nick Quaranto, and many [awesome contributors](https://github.com/jekyll/jekyll/graphs/contributors)!
|
@@ -70,3 +70,27 @@ Feature: Collections
|
|
70
70
|
When I run jekyll build
|
71
71
|
Then the _site directory should exist
|
72
72
|
And I should see "Collections: _methods/configuration.md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
|
73
|
+
|
74
|
+
Scenario: All the documents
|
75
|
+
Given I have an "index.html" page that contains "All documents: {% for doc in site.documents %}{{ doc.relative_path }} {% endfor %}"
|
76
|
+
And I have fixture collections
|
77
|
+
And I have a "_config.yml" file with content:
|
78
|
+
"""
|
79
|
+
collections:
|
80
|
+
- methods
|
81
|
+
"""
|
82
|
+
When I run jekyll build
|
83
|
+
Then the _site directory should exist
|
84
|
+
And I should see "All documents: _methods/configuration.md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
|
85
|
+
|
86
|
+
Scenario: Documents have an output attribute, which is the converted HTML
|
87
|
+
Given I have an "index.html" page that contains "First document's output: {{ site.documents.first.output }}"
|
88
|
+
And I have fixture collections
|
89
|
+
And I have a "_config.yml" file with content:
|
90
|
+
"""
|
91
|
+
collections:
|
92
|
+
- methods
|
93
|
+
"""
|
94
|
+
When I run jekyll build
|
95
|
+
Then the _site directory should exist
|
96
|
+
And I should see "First document's output: <p>Use <code>Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>" in "_site/index.html"
|
@@ -73,3 +73,35 @@ Feature: Embed filters
|
|
73
73
|
Then the _site directory should exist
|
74
74
|
And I should see exactly "Page-2, Page-1" in "_site/page-1.html"
|
75
75
|
And I should see exactly "Page-2, Page-1" in "_site/page-2.html"
|
76
|
+
|
77
|
+
Scenario: Sort pages by the title
|
78
|
+
Given I have a _layouts directory
|
79
|
+
And I have the following page:
|
80
|
+
| title | layout | content |
|
81
|
+
| Dog | default | Run |
|
82
|
+
And I have the following page:
|
83
|
+
| title | layout | content |
|
84
|
+
| Bird | default | Fly |
|
85
|
+
And I have the following page:
|
86
|
+
| layout | content |
|
87
|
+
| default | Jump |
|
88
|
+
And I have a default layout that contains "{% assign sorted_pages = site.pages | sort: 'title' %}The rule of {{ sorted_pages.size }}: {% for p in sorted_pages %}{{ p.content | strip_html | strip_newlines }}, {% endfor %}"
|
89
|
+
When I run jekyll build
|
90
|
+
Then the _site directory should exist
|
91
|
+
And I should see exactly "The rule of 3: Jump, Fly, Run," in "_site/bird.html"
|
92
|
+
|
93
|
+
Scenario: Sort pages by the title ordering pages without title last
|
94
|
+
Given I have a _layouts directory
|
95
|
+
And I have the following page:
|
96
|
+
| title | layout | content |
|
97
|
+
| Dog | default | Run |
|
98
|
+
And I have the following page:
|
99
|
+
| title | layout | content |
|
100
|
+
| Bird | default | Fly |
|
101
|
+
And I have the following page:
|
102
|
+
| layout | content |
|
103
|
+
| default | Jump |
|
104
|
+
And I have a default layout that contains "{% assign sorted_pages = site.pages | sort: 'title', 'last' %}The rule of {{ sorted_pages.size }}: {% for p in sorted_pages %}{{ p.content | strip_html | strip_newlines }}, {% endfor %}"
|
105
|
+
When I run jekyll build
|
106
|
+
Then the _site directory should exist
|
107
|
+
And I should see exactly "The rule of 3: Fly, Run, Jump," in "_site/bird.html"
|
@@ -105,6 +105,15 @@ Feature: Site configuration
|
|
105
105
|
And I should see "Hello world!" in "_site/index.html"
|
106
106
|
And I should see "class=\"highlight\"" in "_site/index.html"
|
107
107
|
|
108
|
+
Scenario: Rouge renders code block once
|
109
|
+
Given I have a configuration file with "highlighter" set to "rouge"
|
110
|
+
And I have a _posts directory
|
111
|
+
And I have the following post:
|
112
|
+
| title | date | layout | content |
|
113
|
+
| foo | 2014-04-27 11:34 | default | {% highlight text %} test {% endhighlight %} |
|
114
|
+
When I run jekyll build
|
115
|
+
Then I should not see "highlight(.*)highlight" in "_site/2014/04/27/foo.html"
|
116
|
+
|
108
117
|
Scenario: Set time and no future dated posts
|
109
118
|
Given I have a _layouts directory
|
110
119
|
And I have a page layout that contains "Page Layout: {{ site.posts.size }} on {{ site.time | date: "%Y-%m-%d" }}"
|
@@ -165,7 +165,7 @@ Then /^the (.*) directory should not exist$/ do |dir|
|
|
165
165
|
end
|
166
166
|
|
167
167
|
Then /^I should see "(.*)" in "(.*)"$/ do |text, file|
|
168
|
-
assert_match Regexp.new(text), file_contents(file)
|
168
|
+
assert_match Regexp.new(text, Regexp::MULTILINE), file_contents(file)
|
169
169
|
end
|
170
170
|
|
171
171
|
Then /^I should see exactly "(.*)" in "(.*)"$/ do |text, file|
|
@@ -173,7 +173,7 @@ Then /^I should see exactly "(.*)" in "(.*)"$/ do |text, file|
|
|
173
173
|
end
|
174
174
|
|
175
175
|
Then /^I should not see "(.*)" in "(.*)"$/ do |text, file|
|
176
|
-
assert_no_match Regexp.new(text), file_contents(file)
|
176
|
+
assert_no_match Regexp.new(text, Regexp::MULTILINE), file_contents(file)
|
177
177
|
end
|
178
178
|
|
179
179
|
Then /^I should see escaped "(.*)" in "(.*)"$/ do |text, file|
|
data/features/support/env.rb
CHANGED
@@ -28,7 +28,11 @@ def run_jekyll(args)
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def slug(title)
|
31
|
-
title
|
31
|
+
if title
|
32
|
+
title.downcase.gsub(/[^\w]/, " ").strip.gsub(/\s+/, '-')
|
33
|
+
else
|
34
|
+
Time.now.strftime("%s%9N") # nanoseconds since the Epoch
|
35
|
+
end
|
32
36
|
end
|
33
37
|
|
34
38
|
def location(folder, direction)
|
data/jekyll.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.add_runtime_dependency('liquid', "~> 2.5.5")
|
32
32
|
s.add_runtime_dependency('classifier', "~> 1.3")
|
33
33
|
s.add_runtime_dependency('listen', "~> 2.5")
|
34
|
-
s.add_runtime_dependency('
|
34
|
+
s.add_runtime_dependency('kramdown', "~> 1.3")
|
35
35
|
s.add_runtime_dependency('pygments.rb', "~> 0.5.0")
|
36
36
|
s.add_runtime_dependency('mercenary', "~> 0.3.1")
|
37
37
|
s.add_runtime_dependency('safe_yaml', "~> 1.0")
|
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
|
|
39
39
|
s.add_runtime_dependency('redcarpet', "~> 3.1")
|
40
40
|
s.add_runtime_dependency('toml', '~> 0.1.0')
|
41
41
|
s.add_runtime_dependency('jekyll-coffeescript', '~> 1.0')
|
42
|
-
s.add_runtime_dependency('jekyll-sass-converter', '~> 1.0
|
42
|
+
s.add_runtime_dependency('jekyll-sass-converter', '~> 1.0')
|
43
43
|
|
44
44
|
s.add_development_dependency('rake', "~> 10.1")
|
45
45
|
s.add_development_dependency('rdoc', "~> 3.11")
|
@@ -48,7 +48,7 @@ Gem::Specification.new do |s|
|
|
48
48
|
s.add_development_dependency('rr', "~> 1.1")
|
49
49
|
s.add_development_dependency('cucumber', "1.3.11")
|
50
50
|
s.add_development_dependency('RedCloth', "~> 4.2")
|
51
|
-
s.add_development_dependency('
|
51
|
+
s.add_development_dependency('maruku', "0.7.0")
|
52
52
|
s.add_development_dependency('rdiscount', "~> 1.6")
|
53
53
|
s.add_development_dependency('launchy', "~> 2.3")
|
54
54
|
s.add_development_dependency('simplecov', "~> 0.7")
|
@@ -25,7 +25,7 @@ module Jekyll
|
|
25
25
|
options = configuration_from_options(options)
|
26
26
|
site = Jekyll::Site.new(options)
|
27
27
|
|
28
|
-
Jekyll.logger.log_level =
|
28
|
+
Jekyll.logger.log_level = :error if options['quiet']
|
29
29
|
|
30
30
|
build(site, options)
|
31
31
|
watch(site, options) if options['watch']
|
@@ -70,8 +70,8 @@ module Jekyll
|
|
70
70
|
Jekyll.logger.info "Auto-regeneration:", "enabled"
|
71
71
|
|
72
72
|
listener = Listen.to(
|
73
|
-
source,
|
74
|
-
:ignore => ignored,
|
73
|
+
source,
|
74
|
+
:ignore => ignored,
|
75
75
|
:force_polling => options['force_polling']
|
76
76
|
) do |modified, added, removed|
|
77
77
|
t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
@@ -41,7 +41,7 @@ module Jekyll
|
|
41
41
|
if page.uses_relative_permalinks
|
42
42
|
Jekyll.logger.warn "Deprecation:", "'#{page.path}' uses relative" +
|
43
43
|
" permalinks which will be deprecated in" +
|
44
|
-
" Jekyll
|
44
|
+
" Jekyll v2.0.0 and beyond."
|
45
45
|
contains_deprecated_pages = true
|
46
46
|
end
|
47
47
|
end
|
data/lib/jekyll/commands/new.rb
CHANGED
@@ -29,33 +29,20 @@ module Jekyll
|
|
29
29
|
# Boot up a WEBrick server which points to the compiled site's root.
|
30
30
|
def process(options)
|
31
31
|
options = configuration_from_options(options)
|
32
|
-
|
33
|
-
require 'webrick'
|
34
|
-
|
35
32
|
destination = options['destination']
|
36
|
-
|
37
|
-
FileUtils.mkdir_p(destination)
|
38
|
-
|
39
|
-
# monkey patch WEBrick using custom 404 page (/404.html)
|
40
|
-
if File.exist?(File.join(destination, '404.html'))
|
41
|
-
WEBrick::HTTPResponse.class_eval do
|
42
|
-
def create_error_page
|
43
|
-
@body = IO.read(File.join(@config[:DocumentRoot], '404.html'))
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
# recreate NondisclosureName under utf-8 circumstance
|
49
|
-
fh_option = WEBrick::Config::FileHandler
|
50
|
-
fh_option[:NondisclosureName] = ['.ht*','~*']
|
33
|
+
setup(destination)
|
51
34
|
|
52
35
|
s = WEBrick::HTTPServer.new(webrick_options(options))
|
36
|
+
s.unmount("")
|
53
37
|
|
54
|
-
s.
|
38
|
+
s.mount(
|
39
|
+
options['baseurl'],
|
40
|
+
WEBrick::HTTPServlet::FileHandler,
|
41
|
+
destination,
|
42
|
+
file_handler_options
|
43
|
+
)
|
55
44
|
|
56
|
-
|
57
|
-
|
58
|
-
Jekyll.logger.info "Server address:", "http://#{s.config[:BindAddress]}:#{s.config[:Port]}"
|
45
|
+
Jekyll.logger.info "Server address:", server_address(s, options)
|
59
46
|
|
60
47
|
if options['detach'] # detach the server
|
61
48
|
pid = Process.fork { s.start }
|
@@ -68,6 +55,22 @@ module Jekyll
|
|
68
55
|
end
|
69
56
|
end
|
70
57
|
|
58
|
+
def setup(destination)
|
59
|
+
require 'webrick'
|
60
|
+
|
61
|
+
FileUtils.mkdir_p(destination)
|
62
|
+
|
63
|
+
# monkey patch WEBrick using custom 404 page (/404.html)
|
64
|
+
if File.exist?(File.join(destination, '404.html'))
|
65
|
+
WEBrick::HTTPResponse.class_eval do
|
66
|
+
def create_error_page
|
67
|
+
@header['content-type'] = "text/html; charset=UTF-8"
|
68
|
+
@body = IO.read(File.join(@config[:DocumentRoot], '404.html'))
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
71
74
|
def webrick_options(config)
|
72
75
|
opts = {
|
73
76
|
:DocumentRoot => config['destination'],
|
@@ -75,7 +78,8 @@ module Jekyll
|
|
75
78
|
:BindAddress => config['host'],
|
76
79
|
:MimeTypes => mime_types,
|
77
80
|
:DoNotReverseLookup => true,
|
78
|
-
:StartCallback => start_callback(config['detach'])
|
81
|
+
:StartCallback => start_callback(config['detach']),
|
82
|
+
:DirectoryIndex => %w(index.html index.htm index.cgi index.rhtml index.xml)
|
79
83
|
}
|
80
84
|
|
81
85
|
if !config['verbose']
|
@@ -99,6 +103,24 @@ module Jekyll
|
|
99
103
|
WEBrick::HTTPUtils::load_mime_types(mime_types_file)
|
100
104
|
end
|
101
105
|
|
106
|
+
def server_address(server, options)
|
107
|
+
baseurl = "#{options['baseurl']}/" if options['baseurl']
|
108
|
+
[
|
109
|
+
"http://",
|
110
|
+
server.config[:BindAddress],
|
111
|
+
":",
|
112
|
+
server.config[:Port],
|
113
|
+
baseurl || ""
|
114
|
+
].map(&:to_s).join("")
|
115
|
+
end
|
116
|
+
|
117
|
+
# recreate NondisclosureName under utf-8 circumstance
|
118
|
+
def file_handler_options
|
119
|
+
fh_option = WEBrick::Config::FileHandler
|
120
|
+
fh_option[:NondisclosureName] = ['.ht*','~*']
|
121
|
+
fh_option
|
122
|
+
end
|
123
|
+
|
102
124
|
end
|
103
125
|
|
104
126
|
end
|
data/lib/jekyll/configuration.rb
CHANGED
@@ -27,8 +27,7 @@ module Jekyll
|
|
27
27
|
'future' => true, # remove and make true just default
|
28
28
|
'unpublished' => false,
|
29
29
|
|
30
|
-
'relative_permalinks' =>
|
31
|
-
# will be set to false once 2.0 hits
|
30
|
+
'relative_permalinks' => false,
|
32
31
|
|
33
32
|
'markdown' => 'kramdown',
|
34
33
|
'highlighter' => 'pygments',
|
@@ -6,7 +6,7 @@ module Jekyll
|
|
6
6
|
module CommonMethods
|
7
7
|
def add_code_tags(code, lang)
|
8
8
|
code = code.to_s
|
9
|
-
code = code.sub(/<pre>/, "<pre><code class=\"
|
9
|
+
code = code.sub(/<pre>/, "<pre><code class=\"language-#{lang}\" data-lang=\"#{lang}\">")
|
10
10
|
code = code.sub(/<\/pre>/,"</code></pre>")
|
11
11
|
end
|
12
12
|
end
|
data/lib/jekyll/convertible.rb
CHANGED
@@ -50,9 +50,9 @@ module Jekyll
|
|
50
50
|
self.data = SafeYAML.load($1)
|
51
51
|
end
|
52
52
|
rescue SyntaxError => e
|
53
|
-
|
53
|
+
Jekyll.logger.warn "YAML Exception reading #{File.join(base, name)}: #{e.message}"
|
54
54
|
rescue Exception => e
|
55
|
-
|
55
|
+
Jekyll.logger.warn "Error reading file #{File.join(base, name)}: #{e.message}"
|
56
56
|
end
|
57
57
|
|
58
58
|
self.data ||= {}
|
data/lib/jekyll/document.rb
CHANGED
@@ -194,6 +194,7 @@ module Jekyll
|
|
194
194
|
def to_liquid
|
195
195
|
if data.is_a?(Hash)
|
196
196
|
Utils.deep_merge_hashes data, {
|
197
|
+
"output" => output,
|
197
198
|
"content" => content,
|
198
199
|
"path" => path,
|
199
200
|
"relative_path" => relative_path,
|
@@ -228,5 +229,14 @@ module Jekyll
|
|
228
229
|
path <=> anotherDocument.path
|
229
230
|
end
|
230
231
|
|
232
|
+
# Determine whether this document should be written.
|
233
|
+
# Based on the Collection to which it belongs.
|
234
|
+
#
|
235
|
+
# True if the document has a collection and if that collection's #write?
|
236
|
+
# method returns true, otherwise false.
|
237
|
+
def write?
|
238
|
+
collection && collection.write?
|
239
|
+
end
|
240
|
+
|
231
241
|
end
|
232
242
|
end
|