jekyll 2.0.0.alpha.1 → 2.0.0.alpha.2
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/.gitignore +15 -0
- data/.travis.yml +27 -0
- data/History.markdown +66 -1
- data/LICENSE +2 -2
- data/README.markdown +2 -2
- data/Rakefile +4 -44
- data/bin/jekyll +10 -113
- data/docs/jp/CONTRIBUTING.jp.markdown +93 -0
- data/docs/jp/README.jp.markdown +69 -0
- data/features/create_sites.feature +12 -12
- data/features/drafts.feature +23 -2
- data/features/embed_filters.feature +7 -5
- data/features/include_tag.feature +7 -7
- data/features/markdown.feature +4 -4
- data/features/pagination.feature +2 -2
- data/features/permalinks.feature +7 -7
- data/features/post_data.feature +21 -21
- data/features/post_excerpts.feature +6 -6
- data/features/site_configuration.feature +17 -17
- data/features/site_data.feature +15 -15
- data/features/step_definitions/jekyll_steps.rb +4 -4
- data/features/support/env.rb +2 -2
- data/jekyll.gemspec +17 -284
- data/lib/jekyll.rb +21 -5
- data/lib/jekyll/command.rb +72 -20
- data/lib/jekyll/commands/build.rb +82 -58
- data/lib/jekyll/commands/docs.rb +30 -0
- data/lib/jekyll/commands/doctor.rb +18 -1
- data/lib/jekyll/commands/new.rb +19 -6
- data/lib/jekyll/commands/serve.rb +80 -49
- data/lib/jekyll/configuration.rb +3 -3
- data/lib/jekyll/converters/markdown/kramdown_parser.rb +1 -1
- data/lib/jekyll/converters/markdown/redcarpet_parser.rb +1 -0
- data/lib/jekyll/convertible.rb +19 -21
- data/lib/jekyll/draft.rb +5 -0
- data/lib/jekyll/excerpt.rb +5 -5
- data/lib/jekyll/layout.rb +2 -2
- data/lib/jekyll/layout_reader.rb +15 -2
- data/lib/jekyll/page.rb +17 -17
- data/lib/jekyll/post.rb +33 -33
- data/lib/jekyll/related_posts.rb +5 -5
- data/lib/jekyll/site.rb +84 -85
- data/lib/jekyll/static_file.rb +13 -0
- data/lib/jekyll/stevenson.rb +1 -1
- data/lib/jekyll/tags/highlight.rb +16 -6
- data/lib/jekyll/tags/include.rb +17 -17
- data/lib/jekyll/url.rb +2 -0
- data/lib/jekyll/utils.rb +79 -0
- data/lib/jekyll/version.rb +3 -0
- data/lib/site_template/_config.yml +3 -1
- data/lib/site_template/_includes/footer.html +61 -0
- data/lib/site_template/_includes/head.html +12 -0
- data/lib/site_template/_includes/header.html +27 -0
- data/lib/site_template/_layouts/default.html +9 -34
- data/lib/site_template/_layouts/page.html +14 -0
- data/lib/site_template/_layouts/post.html +11 -5
- data/lib/site_template/_posts/0000-00-00-this-post-demonstrates-post-content-styles.md +88 -0
- data/lib/site_template/about/index.md +10 -0
- data/lib/site_template/css/main.css +333 -100
- data/lib/site_template/feed.xml +21 -0
- data/lib/site_template/index.html +8 -4
- data/lib/site_template/projects/index.md +14 -0
- data/script/cibuild +0 -1
- data/script/rebund +1 -1
- data/site/_includes/analytics.html +2 -2
- data/site/_includes/css/normalize.css +1 -1
- data/site/_includes/css/style.css +28 -4
- data/site/_includes/docs_option.html +1 -1
- data/site/_includes/docs_ul.html +3 -3
- data/site/_includes/footer.html +1 -1
- data/site/_includes/header.html +2 -2
- data/site/_includes/news_item.html +1 -1
- data/site/_includes/primary-nav-items.html +4 -4
- data/site/_includes/section_nav.html +2 -2
- data/site/_includes/top.html +6 -7
- data/site/_layouts/news_item.html +1 -1
- data/site/_posts/2013-07-25-jekyll-1-0-4-released.markdown +1 -1
- data/site/_posts/2013-07-25-jekyll-1-1-2-released.markdown +1 -1
- data/site/_posts/2013-09-14-jekyll-1-2-1-released.markdown +1 -1
- data/site/_posts/2014-03-24-jekyll-1-5-0-released.markdown +19 -0
- data/site/docs/assets.md +14 -0
- data/site/docs/configuration.md +65 -56
- data/site/docs/contributing.md +7 -2
- data/site/docs/deployment-methods.md +1 -1
- data/site/docs/github-pages.md +1 -1
- data/site/docs/history.md +21 -0
- data/site/docs/index.md +7 -1
- data/site/docs/installation.md +28 -0
- data/site/docs/migrations.md +1 -1
- data/site/docs/plugins.md +6 -0
- data/site/docs/structure.md +3 -3
- data/site/docs/templates.md +44 -44
- data/site/docs/usage.md +1 -1
- data/site/docs/variables.md +15 -2
- data/site/favicon.png +0 -0
- data/site/feed.xml +0 -1
- data/site/img/article-footer.png +0 -0
- data/site/img/footer-arrow.png +0 -0
- data/site/img/footer-logo.png +0 -0
- data/site/img/logo-2x.png +0 -0
- data/site/img/octojekyll.png +0 -0
- data/site/img/tube.png +0 -0
- data/site/img/tube1x.png +0 -0
- data/site/index.html +5 -5
- data/site/js/modernizr-2.7.1.min.js +4 -0
- data/test/helper.rb +11 -0
- data/test/source/_drafts/draft-properties.text +11 -0
- data/test/source/_posts/2011-04-12-md-extension.md +1 -1
- data/test/source/_posts/2014-01-06-permalink-traversal.md +5 -0
- data/test/source/exploit.md +5 -0
- data/test/source/static_files.html +4 -0
- data/test/test_configuration.rb +2 -2
- data/test/test_draft.rb +56 -0
- data/test/test_excerpt.rb +2 -2
- data/test/test_filters.rb +1 -1
- data/test/test_generated_site.rb +10 -1
- data/test/test_kramdown.rb +1 -1
- data/test/test_layout_reader.rb +17 -0
- data/test/test_page.rb +10 -0
- data/test/test_pager.rb +4 -2
- data/test/test_path_sanitization.rb +14 -0
- data/test/test_post.rb +12 -1
- data/test/test_sass.rb +1 -64
- data/test/test_site.rb +26 -1
- data/test/test_tags.rb +39 -2
- data/test/{test_core_ext.rb → test_utils.rb} +12 -12
- metadata +200 -86
- data/lib/jekyll/converters/sass.rb +0 -58
- data/lib/jekyll/core_ext.rb +0 -55
- data/lib/site_template/css/syntax.css +0 -60
- data/site/js/modernizr-2.5.3.min.js +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2129c676c88c85afd6da6cd5b520dfccaa795e68
|
4
|
+
data.tar.gz: b6efe0dc16a0109daa2298d4f1b246f6e85e0d04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fbf7a160e18742295f9821f1a18a8f29b976a8cfccd2cf122d2446ddcd4b13c95d39a563ee564c3d9f31722e268b72d14e9c98776ba9b9c6fa593b492e9ed84
|
7
|
+
data.tar.gz: 15f7be0c135a431aae9d1570c25633750e221f1763920c214d0a75c95425ada75099768bbfb7263c736964f2d6181cb91a6fcac185cba853f4f234558f98db5f
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
language: ruby
|
2
|
+
cache: bundler
|
3
|
+
install:
|
4
|
+
- script/rebund download
|
5
|
+
- travis_retry bundle install --path vendor/bundle
|
6
|
+
rvm:
|
7
|
+
- 2.1.0
|
8
|
+
- 2.0.0
|
9
|
+
- 1.9.3
|
10
|
+
script: script/cibuild
|
11
|
+
after_script:
|
12
|
+
- script/rebund upload
|
13
|
+
notifications:
|
14
|
+
irc:
|
15
|
+
on_success: change
|
16
|
+
on_failure: change
|
17
|
+
channels:
|
18
|
+
- irc.freenode.org#jekyll
|
19
|
+
template:
|
20
|
+
- '%{repository}#%{build_number} (%{branch}) %{message} %{build_url}'
|
21
|
+
email:
|
22
|
+
on_success: never
|
23
|
+
on_failure: never
|
24
|
+
env:
|
25
|
+
global:
|
26
|
+
- secure: bt5nglPTdsc0N5fB1dOJz2WbM81dGpDuVD8PnhEsxgUfoo6xavhU4+pNrUADlSUqQ1aJrdU+MKW4x+JZ2ZnJS8vOpNzRymuMZSbFaljK4pgFGiKFgBdMKxVikvoYcxKCjLAl7NJZ11W6hUw+JtJScClDZwrJJAQB6I7Isp/LsdM=
|
27
|
+
- secure: Ym8nx7nbfGYGo47my92M+deJykaiMkdZdb615EO51liv/xy/0aQ919Jpfieugc9d3zVnm+zFGPbpv4YzRpsik6OlVBNa4lP+BnQ27ptf5YcLWD8Hksi7845WFLecXMoaTCoYer/TvYZsIWJb2nSDMH9qbfZhnd1YZKuvUpK0rEU=
|
data/History.markdown
CHANGED
@@ -13,6 +13,9 @@
|
|
13
13
|
`Post#next` or `Post#previous` (#1983)
|
14
14
|
* Provide support for CoffeeScript (#1991)
|
15
15
|
* Replace Maruku with Kramdown as Default Markdown Processor (#1988)
|
16
|
+
* Expose `site.static_files` to Liquid (#2075)
|
17
|
+
* Complete redesign of the template site generated by `jekyll new` (#2050)
|
18
|
+
* Update Listen from 1.x to 2.x (#2097)
|
16
19
|
|
17
20
|
### Minor Enhancements
|
18
21
|
* Move the EntryFilter class into the Jekyll module to avoid polluting the
|
@@ -37,6 +40,19 @@
|
|
37
40
|
servers (#1993)
|
38
41
|
* Adding Breakpoint to make new site template more responsive (#2038)
|
39
42
|
* Default to using the UTF-8 encoding when reading files. (#2031)
|
43
|
+
* Update Redcarpet dependency to ~> 3.1 (#2044)
|
44
|
+
* Remove support for Ruby 1.9.2 (#2045)
|
45
|
+
* Add `.mkdown` as valid Markdown extension (#2048)
|
46
|
+
* Add `index.xml` to the list of WEBrick directory index files (#2041)
|
47
|
+
* Make the `layouts` config key relative to CWD or to source (#2058)
|
48
|
+
* Update Kramdown to `~> 1.3` (#1894)
|
49
|
+
* Remove unnecessary references to `self` (#2090)
|
50
|
+
* Update to Mercenary v0.3.x (#2085)
|
51
|
+
* Ship Sass support as a separate gem (#2098)
|
52
|
+
* Extract core extensions into a Utils module (#2112)
|
53
|
+
* Refactor CLI & Commands For Greater Happiness (#2143)
|
54
|
+
* Provide useful error when Pygments returns `nil` and error out (#2148)
|
55
|
+
* Add support for unpublished drafts (#2164)
|
40
56
|
|
41
57
|
### Bug Fixes
|
42
58
|
* Don't allow nil entries when loading posts (#1796)
|
@@ -52,12 +68,19 @@
|
|
52
68
|
* Don't generate pages that aren't being published (#1931)
|
53
69
|
* Use `SafeYAML.load` to avoid conflicts with other projects (#1982)
|
54
70
|
* Relative posts should never fail to build (#1976)
|
71
|
+
* Remove executable bits of non executable files (#2056)
|
72
|
+
* `#path` for a draft is now `_drafts` instead of `_posts` (#2042)
|
73
|
+
* Patch a couple show-stopping security vulnerabilities (#1946)
|
74
|
+
* Sanitize paths uniformly, in a Windows-friendly way (#2065, #2109)
|
75
|
+
* Update gem build steps to work correctly on Windows (#2118)
|
76
|
+
* Remove obsolete `normalize_options` method call from `bin/jekyll` (#2121).
|
77
|
+
* Remove `+` characters from Pygments lexer names when adding as a CSS
|
78
|
+
class (#994)
|
55
79
|
|
56
80
|
### Development Fixes
|
57
81
|
* Add a link to the site in the README.md file (#1795)
|
58
82
|
* Add in History and site changes from `v1-stable` branch (#1836)
|
59
83
|
* Testing additions on the Excerpt class (#1893)
|
60
|
-
* Update Kramdown to `~> 1.3` (#1894)
|
61
84
|
* Fix the `highlight` tag feature (#1859)
|
62
85
|
* Test Jekyll under Ruby 2.1.0 (#1900)
|
63
86
|
* Add script/cibuild for fun and profit (#1912)
|
@@ -72,6 +95,13 @@
|
|
72
95
|
* Remove Yarp as a Gem proxy for Travis CI (#2004)
|
73
96
|
* Move the reading of layouts into its own class (#2020)
|
74
97
|
* Test Sass import (#2009)
|
98
|
+
* Switch Maruku and Kramdown in lists of Runtime vs. Development dependencies (#2049)
|
99
|
+
* Clean up the gemspec for the project (#2095)
|
100
|
+
* Add Japanese translation of README and CONTRIBUTING docs. (#2081)
|
101
|
+
* Re-align the tables in Cucumber (#2108)
|
102
|
+
* Trim trailing spaces and convert tabs to spaces (#2122)
|
103
|
+
* Fix the failing Travis scenarios due to Cucumber issues (#2155)
|
104
|
+
* Wrap `bundle install` in `travis_retry` to retry when RubyGems fails (#2160)
|
75
105
|
|
76
106
|
### Site Enhancements
|
77
107
|
* Document Kramdown's GFM parser option (#1791)
|
@@ -108,6 +138,41 @@
|
|
108
138
|
* Fix non-semantic nesting of `p` tags in `news_item` layout (#2013)
|
109
139
|
* Document destination folder cleaning (#2016)
|
110
140
|
* Updated instructions for NearlyFreeSpeech.NET installation (#2015)
|
141
|
+
* Update link to rack-jekyll on "Deployment Methods" page (#2047)
|
142
|
+
* Fix typo in /docs/configuration (#2073)
|
143
|
+
* Fix count in docs for `site.static_files` (#2077)
|
144
|
+
* Update configuration docs to indicate utf-8 is the default for 2.0.0
|
145
|
+
and ASCII for 1.9.3 (#2074)
|
146
|
+
* Add info about unreleased feature to the site (#2061)
|
147
|
+
* Add whitespace to liquid example in GitHub Pages docs (#2084)
|
148
|
+
* Clarify the way Sass and CoffeeScript files are read in and output (#2067)
|
149
|
+
* Add lyche gallery tag plugin link to list of plugins (#2094)
|
150
|
+
* Add Jekyll Pages Directory plugin to list of plugins (#2096)
|
151
|
+
* Update Configuration docs page with new markdown extension (#2102)
|
152
|
+
* Add `jekyll-image-set` to the list of third-party plugins (#2105)
|
153
|
+
* Losslessly compress images (#2128)
|
154
|
+
* Update normalize.css to 3.0.0 (#2126)
|
155
|
+
* Update modernizr to v2.7.1 (#2129)
|
156
|
+
* Add `jekyll-ordinal` to list of third-party plugins (#2150)
|
157
|
+
* Add `jekyll_figure` to list of third-party plugins (#2158)
|
158
|
+
* Clarify the documentation for safe mode (#2163)
|
159
|
+
* Some HTML tidying (#2130)
|
160
|
+
|
161
|
+
## 1.5.0 / 2014-03-24
|
162
|
+
|
163
|
+
### Minor Enhancements
|
164
|
+
|
165
|
+
* Loosen `safe_yaml` dependency to `~> 1.0` (#2167)
|
166
|
+
* Bump `safe_yaml` dependency to `~> 1.0.0` (#1942)
|
167
|
+
|
168
|
+
### Bug Fixes
|
169
|
+
|
170
|
+
* Fix issue where filesystem traversal restriction broke Windows (#2167)
|
171
|
+
* Lock `maruku` at `0.7.0` (#2167)
|
172
|
+
|
173
|
+
### Development Fixes
|
174
|
+
|
175
|
+
* Lock `cucumber` at `1.3.11` (#2167)
|
111
176
|
|
112
177
|
## 1.4.3 / 2014-01-13
|
113
178
|
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
(The MIT License)
|
2
2
|
|
3
|
-
Copyright (c) 2008 Tom Preston-Werner
|
3
|
+
Copyright (c) 2008-2014 Tom Preston-Werner
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the 'Software'), to deal
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
21
|
+
SOFTWARE.
|
data/README.markdown
CHANGED
@@ -38,16 +38,16 @@ Jekyll does what you tell it to do — no more, no less. It doesn't try to outs
|
|
38
38
|
* Colorator: Colorizes command line output (Ruby)
|
39
39
|
* Classifier: Generating related posts (Ruby)
|
40
40
|
* Directory Watcher: Auto-regeneration of sites (Ruby)
|
41
|
+
* Kramdown: Default Markdown engine (Ruby)
|
41
42
|
* Liquid: Templating system (Ruby)
|
42
|
-
* Maruku: Default markdown engine (Ruby)
|
43
43
|
* Pygments.rb: Syntax highlighting (Ruby/Python)
|
44
44
|
* RedCarpet: Markdown engine (Ruby)
|
45
45
|
* Safe YAML: YAML Parser built for security (Ruby)
|
46
46
|
|
47
47
|
## Developer Dependencies
|
48
48
|
|
49
|
-
* Kramdown: Markdown-superset converter (Ruby)
|
50
49
|
* Launchy: Cross-platform file launcher (Ruby)
|
50
|
+
* Maruku: Markdown-superset interpreter (Ruby)
|
51
51
|
* RDiscount: Discount Markdown Processor (Ruby)
|
52
52
|
* RedCloth: Textile support (Ruby)
|
53
53
|
* RedGreen: Nicer test output (Ruby)
|
data/Rakefile
CHANGED
@@ -5,6 +5,7 @@ require 'date'
|
|
5
5
|
require 'yaml'
|
6
6
|
|
7
7
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), *%w[lib]))
|
8
|
+
require 'jekyll/version'
|
8
9
|
|
9
10
|
#############################################################################
|
10
11
|
#
|
@@ -17,20 +18,7 @@ def name
|
|
17
18
|
end
|
18
19
|
|
19
20
|
def version
|
20
|
-
|
21
|
-
line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
|
22
|
-
end
|
23
|
-
|
24
|
-
def date
|
25
|
-
Date.today.to_s
|
26
|
-
end
|
27
|
-
|
28
|
-
def file_date
|
29
|
-
Date.today.strftime("%F")
|
30
|
-
end
|
31
|
-
|
32
|
-
def rubyforge_project
|
33
|
-
name
|
21
|
+
Jekyll::VERSION
|
34
22
|
end
|
35
23
|
|
36
24
|
def gemspec_file
|
@@ -263,36 +251,8 @@ task :release => :build do
|
|
263
251
|
sh "gem push pkg/#{name}-#{version}.gem"
|
264
252
|
end
|
265
253
|
|
266
|
-
task :build
|
267
|
-
|
254
|
+
task :build do
|
255
|
+
mkdir_p "pkg"
|
268
256
|
sh "gem build #{gemspec_file}"
|
269
257
|
sh "mv #{gem_file} pkg"
|
270
258
|
end
|
271
|
-
|
272
|
-
task :gemspec do
|
273
|
-
# read spec file and split out manifest section
|
274
|
-
spec = File.read(gemspec_file)
|
275
|
-
head, manifest, tail = spec.split(" # = MANIFEST =\n")
|
276
|
-
|
277
|
-
# replace name version and date
|
278
|
-
replace_header(head, :name)
|
279
|
-
replace_header(head, :version)
|
280
|
-
replace_header(head, :date)
|
281
|
-
#comment this out if your rubyforge_project has a different name
|
282
|
-
replace_header(head, :rubyforge_project)
|
283
|
-
|
284
|
-
# determine file list from git ls-files
|
285
|
-
files = `git ls-files`.
|
286
|
-
split("\n").
|
287
|
-
sort.
|
288
|
-
reject { |file| file =~ /^\./ }.
|
289
|
-
reject { |file| file =~ /^(rdoc|pkg|coverage)/ }.
|
290
|
-
map { |file| " #{file}" }.
|
291
|
-
join("\n")
|
292
|
-
|
293
|
-
# piece file back together and write
|
294
|
-
manifest = " s.files = %w[\n#{files}\n ]\n"
|
295
|
-
spec = [head, manifest, tail].join(" # = MANIFEST =\n")
|
296
|
-
File.open(gemspec_file, 'w') { |io| io.write(spec) }
|
297
|
-
puts "Updated #{gemspec_file}"
|
298
|
-
end
|
data/bin/jekyll
CHANGED
@@ -6,19 +6,15 @@ $:.unshift File.join(File.dirname(__FILE__), *%w{ .. lib })
|
|
6
6
|
require 'jekyll'
|
7
7
|
require 'mercenary'
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
c.option 'limit_posts', '--limit_posts MAX_POSTS', Integer, 'Limits the number of posts to parse and publish'
|
15
|
-
c.option 'watch', '-w', '--watch', 'Watch for changes and rebuild'
|
16
|
-
c.option 'lsi', '--lsi', 'Use LSI for improved related posts'
|
17
|
-
c.option 'show_drafts', '-D', '--drafts', 'Render posts in the _drafts folder'
|
18
|
-
c.option 'quiet', '-q', '--quiet', 'Silence output.'
|
19
|
-
c.option 'verbose', '-V', '--verbose', 'Print verbose output.'
|
9
|
+
%w[jekyll-import].each do |blessed_gem|
|
10
|
+
begin
|
11
|
+
require blessed_gem
|
12
|
+
rescue LoadError
|
13
|
+
end
|
20
14
|
end
|
21
15
|
|
16
|
+
Jekyll::Deprecator.process(ARGV)
|
17
|
+
|
22
18
|
Mercenary.program(:jekyll) do |p|
|
23
19
|
p.version Jekyll::VERSION
|
24
20
|
p.description 'Jekyll is a blog-aware, static site generator in Ruby'
|
@@ -30,114 +26,15 @@ Mercenary.program(:jekyll) do |p|
|
|
30
26
|
p.option 'plugins', '-p', '--plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]', Array, 'Plugins directory (defaults to ./_plugins)'
|
31
27
|
p.option 'layouts', '--layouts DIR', String, 'Layouts directory (defaults to ./_layouts)'
|
32
28
|
|
29
|
+
Jekyll::Command.subclasses.each { |c| c.init_with_program(p) }
|
30
|
+
|
33
31
|
p.action do |args, options|
|
34
32
|
if args.empty?
|
35
|
-
p
|
33
|
+
puts p
|
36
34
|
else
|
37
35
|
unless p.has_command?(args.first)
|
38
36
|
Jekyll.logger.abort_with "Invalid command. Use --help for more information"
|
39
37
|
end
|
40
38
|
end
|
41
39
|
end
|
42
|
-
|
43
|
-
p.command(:new) do |c|
|
44
|
-
c.syntax 'jekyll new PATH'
|
45
|
-
c.description 'Creates a new Jekyll site scaffold in PATH'
|
46
|
-
|
47
|
-
c.option 'force', '--force', 'Force creation even if PATH already exists'
|
48
|
-
c.option 'blank', '--blank', 'Creates scaffolding but with empty files'
|
49
|
-
|
50
|
-
c.action do |args, options|
|
51
|
-
Jekyll::Commands::New.process(args)
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
p.command(:build) do |c|
|
56
|
-
c.syntax 'jekyll build [options]'
|
57
|
-
c.description 'Build your site'
|
58
|
-
|
59
|
-
add_build_options(c)
|
60
|
-
|
61
|
-
c.action do |args, options|
|
62
|
-
options["serving"] = false
|
63
|
-
config = Jekyll.configuration(options)
|
64
|
-
Jekyll::Commands::Build.process(config)
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
p.command(:serve) do |c|
|
69
|
-
c.syntax 'jekyll serve [options]'
|
70
|
-
c.description 'Serve your site locally'
|
71
|
-
c.alias :server
|
72
|
-
|
73
|
-
add_build_options(c)
|
74
|
-
|
75
|
-
c.option 'detach', '-B', '--detach', 'Run the server in the background (detach)'
|
76
|
-
c.option 'port', '-P', '--port [PORT]', 'Port to listen on'
|
77
|
-
c.option 'host', '-H', '--host [HOST]', 'Host to bind to'
|
78
|
-
c.option 'baseurl', '-b', '--baseurl [URL]', 'Base URL'
|
79
|
-
|
80
|
-
c.action do |args, options|
|
81
|
-
options["serving"] ||= true
|
82
|
-
options = Jekyll.configuration(options)
|
83
|
-
Jekyll::Commands::Build.process(options)
|
84
|
-
Jekyll::Commands::Serve.process(options)
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
p.command(:doctor) do |c|
|
89
|
-
c.syntax 'jekyll doctor'
|
90
|
-
c.description 'Search site and print specific deprecation warnings'
|
91
|
-
c.alias(:hyde)
|
92
|
-
|
93
|
-
c.option '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
|
94
|
-
|
95
|
-
c.action do |args, options|
|
96
|
-
options = Jekyll.configuration(options)
|
97
|
-
Jekyll::Commands::Doctor.process(options)
|
98
|
-
end
|
99
|
-
end
|
100
|
-
|
101
|
-
p.command(:docs) do |c|
|
102
|
-
c.syntax 'jekyll docs'
|
103
|
-
c.description "Launch local server with docs for Jekyll v#{Jekyll::VERSION}"
|
104
|
-
|
105
|
-
c.option 'port', '-P', '--port [PORT]', 'Port to listen on'
|
106
|
-
c.option 'host', '-H', '--host [HOST]', 'Host to bind to'
|
107
|
-
|
108
|
-
c.action do |args, options|
|
109
|
-
options = normalize_options(options)
|
110
|
-
options = Jekyll.configuration(options.merge!({
|
111
|
-
'source' => File.expand_path("../site", File.dirname(__FILE__)),
|
112
|
-
'destination' => File.expand_path("../site/_site", File.dirname(__FILE__))
|
113
|
-
}))
|
114
|
-
Jekyll::Commands::Build.process(options)
|
115
|
-
Jekyll::Commands::Serve.process(options)
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
p.command(:import) do |c|
|
120
|
-
c.syntax 'jekyll import <platform> [options]'
|
121
|
-
c.description 'Import your old blog to Jekyll'
|
122
|
-
importers = []
|
123
|
-
|
124
|
-
begin
|
125
|
-
require 'jekyll-import'
|
126
|
-
importers = JekyllImport.add_importer_commands(c)
|
127
|
-
rescue LoadError
|
128
|
-
end
|
129
|
-
|
130
|
-
c.action do |args, options|
|
131
|
-
unless Object.const_defined?(:JekyllImport)
|
132
|
-
msg = "You must install the 'jekyll-import' gem before continuing.\n"
|
133
|
-
msg += "* Please see the documentation at http://jekyllrb.com/docs/migrations/ for instructions.\n"
|
134
|
-
abort msg
|
135
|
-
end
|
136
|
-
if args.empty?
|
137
|
-
Jekyll.logger.warn "You must specify an importer."
|
138
|
-
Jekyll.logger.info "Valid options are:"
|
139
|
-
importers.each { |i| Jekyll.logger.info "*", "#{i}" }
|
140
|
-
end
|
141
|
-
end
|
142
|
-
end
|
143
40
|
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
コントリビュート
|
2
|
+
==========
|
3
|
+
|
4
|
+
あなたは Jekyll に投じるすばらしいアイディアを持っています。
|
5
|
+
すばらしいことです!次の事柄を心に留めてください。
|
6
|
+
|
7
|
+
* **テストなしではコントリビュートはできません。**
|
8
|
+
* もし、既存の機能への小さな修正やパッチを作成したなら、シンプルなテストを行います。
|
9
|
+
現在のテストスイートの範囲にとどまり、そして
|
10
|
+
[Shoulda](http://github.com/thoughtbot/shoulda/tree/master) や
|
11
|
+
[RR](http://github.com/btakita/rr/tree/master) を使用してください。
|
12
|
+
* もし、それが新しい機能の場合は、必ず新しい
|
13
|
+
[Cucumber](https://github.com/cucumber/cucumber/) の機能を作成し、
|
14
|
+
必要に応じて手順を再利用します。
|
15
|
+
また、あなたがフォークした `site` に
|
16
|
+
急ぎいくつかのドキュメントを用意し、一度マージを行い
|
17
|
+
メイン `site` の jekyllrb.com に転送していただければ幸いです。
|
18
|
+
* あなたのコントリビュートによって Jekyll の振る舞いが変わった場合、ドキュメントを更新すべきです。
|
19
|
+
それは `site/docs` にあります。
|
20
|
+
もし、 docs に情報の誤りがあった場合、遠慮なく追加してください。
|
21
|
+
すばらしいドキュメントはすばらしいプロジェクトを作ります!
|
22
|
+
* Ruby のコードを変更するときは、 [GitHub Ruby Styleguide](https://github.com/styleguide/ruby)
|
23
|
+
に従ってください。
|
24
|
+
* **小さなプルリクエスト** に最善を尽くしてください。
|
25
|
+
簡単に提案された変更はレビューされ、マージされる可能性が高いです。
|
26
|
+
* プルリクエストを送信するとき、プルリクエストのボディを賢明に使用してください。
|
27
|
+
変更されたかどうかの記述、変更の背後にある動機、 [完了したかどうかのタスクリスト](http://git.io/gfm-tasks)
|
28
|
+
もレビュー時間を早めます。
|
29
|
+
|
30
|
+
テストの依存関係
|
31
|
+
-----------------
|
32
|
+
|
33
|
+
テストスイートの実行や gem のビルドのために、
|
34
|
+
Jekyll の依存ツールをインストールする必要があります。
|
35
|
+
Jekyll は Bundler を使用しており、 `bundle` コマンドを実行すると全ての設定が迅速に行われます!
|
36
|
+
|
37
|
+
$ bundle
|
38
|
+
|
39
|
+
はじめる前に、テストを実行し、必ずテストが通ることを
|
40
|
+
確認してください(あなたの環境が適切に設定されているかを確認するために):
|
41
|
+
|
42
|
+
$ bundle exec rake test
|
43
|
+
$ bundle exec rake features
|
44
|
+
|
45
|
+
ワークフロー
|
46
|
+
--------
|
47
|
+
|
48
|
+
これは、あなたの作業がプロジェクトにマージされるもっとも直接的な方法です:
|
49
|
+
|
50
|
+
* プロジェクトをフォークします。
|
51
|
+
* あなたのフォークプロジェクトをクローンします ( `git clone git@github.com:<username>/jekyll.git` )。
|
52
|
+
* トピックブランチを作成し、あなたの変更を含んでください ( `git checkout -b my_awesome_feature` )。
|
53
|
+
* ハックし、テストを追加します。必ずしもこの順番でなくてかまいません
|
54
|
+
* `rake` を実行し、テストが必ず全て通ることを確認してください
|
55
|
+
* 必要に応じて、エラーがないようにコミットを論理的な塊にリベースしてください
|
56
|
+
* ブランチをプッシュしてください ( `git push origin my_awesome_feature` ).
|
57
|
+
* jekyll/jekyll プロジェクトの master ブランチに対してプルリクエストを作成し、
|
58
|
+
あなたの変更内容と、なぜそれをマージすべきかを記述してください
|
59
|
+
|
60
|
+
ドキュメントの更新
|
61
|
+
----------------------
|
62
|
+
|
63
|
+
私たちは Jekyll のドキュメントについて最善を尽くしたいです。
|
64
|
+
私たちはドキュメントをオープンソース化しました、そして
|
65
|
+
あなたが Jekyll に欠けているものを見つけた場合、私たちはプルリクエストを歓迎しています。
|
66
|
+
|
67
|
+
あなたは、 GitHub.com 上の Jekyll リポジトリの [site]({{ site.repository }}/tree/master/site) で
|
68
|
+
jekyllrb.comのドキュメントを見つけることができます。
|
69
|
+
|
70
|
+
全てのドキュメントのプルリクエストは `master` に向けられる必要があります。
|
71
|
+
他のブランチに向けたプルリクエストは受け入れられません。
|
72
|
+
|
73
|
+
GitHub の [Jekyll wiki](https://github.com/jekyll/jekyll/wiki) は、
|
74
|
+
自由に更新することができるように、プルリクエストなしで
|
75
|
+
全ての GitHub ユーザがアクセス権を持つことができます。
|
76
|
+
|
77
|
+
落とし穴
|
78
|
+
-------
|
79
|
+
|
80
|
+
* もし、 gem のバージョンがかちあった場合、コミットを分けてください。
|
81
|
+
この方法だと、メンテナが gem をリリースするときに制御できます。
|
82
|
+
* jekyll/jekyll の最新コミットに基づいて(複数の)パッチを維持してください。
|
83
|
+
それは適用するためのあなたの仕事で、メンテナがしなければならないことを少なくするのは
|
84
|
+
とてもよいことです。
|
85
|
+
* あなたの GitHub issue で [fix], [feature] などのタグをつけないでください。
|
86
|
+
メンテナは積極的に issue を読み、彼らが問題に出くわしたらラベルをつけるでしょう。
|
87
|
+
|
88
|
+
最後に…
|
89
|
+
----------
|
90
|
+
|
91
|
+
ありがとう! Jekyll のハックは楽しいものでなければなりません。
|
92
|
+
もし、あなたがこのハードを理解するための何かを発見した場合、知らせてください。
|
93
|
+
我々のプロセスやドキュメントを改善することができます!
|