diff --git a/.travis.yml b/.travis.yml index cd1e5f01..09b649ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,8 @@ install: - script/rebund download - travis_retry bundle install --path vendor/bundle rvm: -- 2.1.2 -- 2.0.0 +- 2.1 +- 2.0 - 1.9.3 script: script/cibuild after_script: diff --git a/CONTRIBUTING.markdown b/CONTRIBUTING.markdown index 6bc1e320..94533415 100644 --- a/CONTRIBUTING.markdown +++ b/CONTRIBUTING.markdown @@ -4,10 +4,10 @@ Contribute So you've got an awesome idea to throw into Jekyll. Great! Please keep the following in mind: -* **Contributions will not be accepted without tests.** +* **Contributions will not be accepted without tests or necessary documentation updates.** * If you're creating a small fix or patch to an existing feature, just a simple test will do. Please stay in the confines of the current test suite and use - [Shoulda](http://github.com/thoughtbot/shoulda/tree/master) and + [Shoulda](https://github.com/thoughtbot/shoulda/tree/master) and [RR](https://github.com/rr/rr). * If it's a brand new feature, make sure to create a new [Cucumber](https://github.com/cucumber/cucumber/) feature and reuse steps diff --git a/History.markdown b/History.markdown index b46cc0b4..01a34e8e 100644 --- a/History.markdown +++ b/History.markdown @@ -4,20 +4,102 @@ ### Minor Enhancements + * Patch read vulnerabilities for data & confirm none for layouts (#2563) + +### Bug Fixes + +### Development Fixes + +### Site Enhancements + + * Add vertical margin to `highlight` to separate code blocks (#2558) + +## 2.1.0 / 2014-06-28 + +### Minor Enhancements + + * Bump to the latest Liquid version, 2.6.1 (#2495) * Add support for JSON files in the `_data` directory (#2369) + * Allow subclasses to override `EXCERPT_ATTRIBUTES_FOR_LIQUID` (#2408) + * Add `Jekyll.env` and `jekyll.environment` (the Liquid var) (#2417) + * Use `_config.yaml` or `_config.yml` (`.yml` takes precedence) (#2406) + * Override collection url template (#2418) + * Allow subdirectories in `_data` (#2395) + * Extract Pagination Generator into gem: `jekyll-paginate` (#2455) + * Utilize `date_to_rfc822` filter in site template (#2437) + * Add categories, last build datetime, and generator to site template + feed (#2438) + * Configurable, replaceable Logger-compliant logger (#2444) + * Extract `gist` tag into a separate gem (#2469) + * Add `collection` attribute to `Document#to_liquid` to access the + document's collection label. (#2436) + * Upgrade listen to `2.7.6 <= x < 3.0.0` (#2492) + * Allow configuration of different Twitter and GitHub usernames in site template (#2485) + * Bump Pygments to v0.6.0 (#2504) + * Front-matter defaults for documents in collections (#2419) + * Include files with a url which ends in `/` in the `site.html_pages` list (#2524) + * Make `highlight` tag use `language-` prefix in CSS class (#2511) + * Lookup item property via `item#to_liquid` before `#data` or `#[]` in filters (#2493) + * Skip initial build of site on serve with flag (#2477) + * Add support for `hl_lines` in `highlight` tag (#2532) + * Spike out `--watch` flag into a separate gem (#2550) ### Bug Fixes * Liquid `sort` filter should sort even if one of the values is `nil` (#2345) * Remove padding on `pre code` in the site template CSS (#2383) + * Set `log_level` earlier to silence info level configuration output (#2393) + * Only list pages which have `title` in site template (#2411) + * Accept `Numeric` values for dates, not `Number` values (#2377) + * Prevent code from overflowing container in site template (#2429) + * Encode URLs in UTF-8 when escaping and unescaping (#2420) + * No Layouts or Liquid for Asset Files (#2431) + * Allow front-matter defaults to set post categories (#2373) + * Fix command in subcommand deprecation warning (#2457) + * Keep all parent directories of files/dirs in `keep_files` (#2458) + * When using RedCarpet and Rouge without Rouge installed, fixed erroneous + error which stated that redcarpet was missing, not rouge. (#2464) + * Ignore *all* directories and files that merit it on auto-generation (#2459) + * Before copying file, explicitly remove the old one (#2535) + * Merge file system categories with categories from YAML. (#2531) + * Deep merge front matter defaults (#2490) + * Ensure exclude and include arrays are arrays of strings (#2542) + * Allow collections to have dots in their filenames (#2552) + * Collections shouldn't try to read in directories as files (#2552) + * Be quiet very quickly. (#2520) ### Development Fixes * Test Ruby 2.1.2 instead of 2.1.1 (#2374) * Add test for sorting UTF-8 characters (#2384) + * Use `https` for GitHub links in documentation (#2470) + * Remove coverage reporting with Coveralls (#2494) + * Fix a bit of missing TomDoc to `Jekyll::Commands::Build#build` (#2554) ### Site Enhancements + * Set `timezone` to `America/Los_Angeles` (#2394) + * Improve JavaScript in `anchor_links.html` (#2368) + * Remove note on Quickstart page about default markdown converter (#2387) + * Remove broken link in extras.md to a Maruku fork (#2401) + * Update Font Awesome to v4.1.0. (#2410) + * Fix broken link on Installation page to Templates page (#2421) + * Prevent table from extending parent width in permalink style table (#2424) + * Add collections to info about pagination support (#2389) + * Add `jekyll_github_sample` plugin to list of third-party plugins (#2463) + * Clarify documentation around front-matter defaults and add details + about defaults for collections. (#2439) + * Add Jekyll Project Version Tag to list of third-party plugins (#2468) + * Use `https` for GitHub links across whole site (#2470) + * Add StickerMule + Jekyll post (#2476) + * Add Jekyll Asset Pipeline Reborn to list of third-party plugins (#2479) + * Add link to jekyll-compress-html to list of third-party plugins (#2514) + * Add Piwigo Gallery to list of third-party plugins (#2526) + * Set `show_drafts` to `false` in default configuration listing (#2536) + * Provide an updated link for Windows installation instructions (#2544) + * Remove `url` from configuration docs (#2547) + * Documentation for Continuous Integration for your Jekyll Site (#2432) + ## 2.0.3 / 2014-05-08 ### Bug Fixes diff --git a/README.markdown b/README.markdown index 704a66b9..124004f1 100644 --- a/README.markdown +++ b/README.markdown @@ -1,11 +1,9 @@ # [Jekyll](http://jekyllrb.com/) -[](http://badge.fury.io/rb/jekyll) - +[](https://rubygems.org/gems/jekyll) [](https://travis-ci.org/jekyll/jekyll) -[](https://codeclimate.com/github/jekyll/jekyll) +[](https://codeclimate.com/github/jekyll/jekyll) [](https://gemnasium.com/jekyll/jekyll) -[](https://coveralls.io/r/jekyll/jekyll) By Tom Preston-Werner, Nick Quaranto, and many [awesome contributors](https://github.com/jekyll/jekyll/graphs/contributors)! @@ -19,42 +17,19 @@ Jekyll does what you tell it to do — no more, no less. It doesn't try to outs * [Install](http://jekyllrb.com/docs/installation/) the gem * Read up about its [Usage](http://jekyllrb.com/docs/usage/) and [Configuration](http://jekyllrb.com/docs/configuration/) -* Take a gander at some existing [Sites](http://wiki.github.com/jekyll/jekyll/sites) +* Take a gander at some existing [Sites](https://wiki.github.com/jekyll/jekyll/sites) * Fork and [Contribute](http://jekyllrb.com/docs/contributing/) your own modifications -* Have questions? Check out `#jekyll` on irc.freenode.net. +* Have questions? Check out [`#jekyll` on irc.freenode.net](https://botbot.me/freenode/jekyll/). ## Diving In -* [Migrate](http://jekyllrb.com/docs/migrations/) from your previous system +* [Migrate](http://import.jekyllrb.com/docs/home/) from your previous system * Learn how the [YAML Front Matter](http://jekyllrb.com/docs/frontmatter/) works * Put information on your site with [Variables](http://jekyllrb.com/docs/variables/) * Customize the [Permalinks](http://jekyllrb.com/docs/permalinks/) your posts are generated with * Use the built-in [Liquid Extensions](http://jekyllrb.com/docs/templates/) to make your life easier * Use custom [Plugins](http://jekyllrb.com/docs/plugins/) to generate content specific to your site -## Runtime Dependencies - -* Commander: Command-line interface constructor (Ruby) -* Colorator: Colorizes command line output (Ruby) -* Classifier: Generating related posts (Ruby) -* Directory Watcher: Auto-regeneration of sites (Ruby) -* Kramdown: Default Markdown engine (Ruby) -* Liquid: Templating system (Ruby) -* Pygments.rb: Syntax highlighting (Ruby/Python) -* RedCarpet: Markdown engine (Ruby) -* Safe YAML: YAML Parser built for security (Ruby) - -## Developer Dependencies - -* Launchy: Cross-platform file launcher (Ruby) -* Maruku: Markdown-superset interpreter (Ruby) -* RDiscount: Discount Markdown Processor (Ruby) -* RedCloth: Textile support (Ruby) -* RedGreen: Nicer test output (Ruby) -* RR: Mocking (Ruby) -* Shoulda: Test framework (Ruby) -* SimpleCov: Coverage framework (Ruby) - ## License See [LICENSE](https://github.com/jekyll/jekyll/blob/master/LICENSE). diff --git a/Rakefile b/Rakefile index 8c38b205..e5eb2e8c 100644 --- a/Rakefile +++ b/Rakefile @@ -14,7 +14,7 @@ require 'jekyll/version' ############################################################################# def name - @name ||= Dir['*.gemspec'].first.split('.').first + @name ||= File.basename(Dir['*.gemspec'].first, ".*") end def version @@ -68,14 +68,7 @@ end # ############################################################################# -if ENV["TRAVIS"] == "true" - require 'coveralls/rake/task' - Coveralls::RakeTask.new - - task :default => [:test, :features, 'coveralls:push'] -else - task :default => [:test, :features] -end +task :default => [:test, :features] require 'rake/testtask' Rake::TestTask.new(:test) do |test| @@ -235,6 +228,7 @@ end # ############################################################################# +desc "Release #{name} v#{version}" task :release => :build do unless `git branch` =~ /^\* master$/ puts "You must be on the master branch to release!" @@ -247,6 +241,7 @@ task :release => :build do sh "gem push pkg/#{name}-#{version}.gem" end +desc "Build #{name} v#{version} into pkg/" task :build do mkdir_p "pkg" sh "gem build #{gemspec_file}" diff --git a/docs/jp/CONTRIBUTING.jp.markdown b/docs/jp/CONTRIBUTING.jp.markdown index 1c66d01a..fa8e71cb 100644 --- a/docs/jp/CONTRIBUTING.jp.markdown +++ b/docs/jp/CONTRIBUTING.jp.markdown @@ -7,8 +7,8 @@ * **テストなしではコントリビュートはできません。** * もし、既存の機能への小さな修正やパッチを作成したなら、シンプルなテストを行います。 現在のテストスイートの範囲にとどまり、そして - [Shoulda](http://github.com/thoughtbot/shoulda/tree/master) や - [RR](http://github.com/btakita/rr/tree/master) を使用してください。 + [Shoulda](https://github.com/thoughtbot/shoulda/tree/master) や + [RR](https://github.com/btakita/rr/tree/master) を使用してください。 * もし、それが新しい機能の場合は、必ず新しい [Cucumber](https://github.com/cucumber/cucumber/) の機能を作成し、 必要に応じて手順を再利用します。 diff --git a/docs/jp/README.jp.markdown b/docs/jp/README.jp.markdown index 0085c3f1..2bf7e814 100644 --- a/docs/jp/README.jp.markdown +++ b/docs/jp/README.jp.markdown @@ -5,7 +5,6 @@ [](https://travis-ci.org/jekyll/jekyll) [](https://codeclimate.com/github/jekyll/jekyll) [](https://gemnasium.com/jekyll/jekyll) -[](https://coveralls.io/r/jekyll/jekyll) Tom Preston-Werner, Nick Quaranto や多くの[素晴らしいコントリビュータ](https://github.com/jekyll/jekyll/graphs/contributors)によって作成されています! @@ -28,7 +27,7 @@ Jekyll あなたがするように伝えたことをします ― それ以上 * gem を[インストール](http://jekyllrb.com/docs/installation/)します * [使用方法](http://jekyllrb.com/docs/usage/) と [設定方法](http://jekyllrb.com/docs/configuration/) を読みます -* 既存の [Jekyll で作られたサイト](http://wiki.github.com/jekyll/jekyll/sites) をチラッと見ます +* 既存の [Jekyll で作られたサイト](https://wiki.github.com/jekyll/jekyll/sites) をチラッと見ます * Fork し、あなたの変更を [コントリビュート](http://jekyllrb.com/docs/contributing/) します * 質問があったら? irc.freenode.net の `#jekyll` チャンネルをチェックしてください diff --git a/features/collections.feature b/features/collections.feature index 5c75677f..4f69e8b9 100644 --- a/features/collections.feature +++ b/features/collections.feature @@ -29,6 +29,20 @@ Feature: Collections And I should see "Methods metadata: bar" in "_site/collection_metadata.html" And I should see "
Whatever: foo.bar
" in "_site/methods/configuration.html" + Scenario: Rendered collection at a custom URL + Given I have an "index.html" page that contains "Collections: {{ site.collections }}" + And I have fixture collections + And I have a "_config.yml" file with content: + """ + collections: + methods: + output: true + permalink: /:collection/:path/ + """ + When I run jekyll build + Then the _site directory should exist + And I should see "Whatever: foo.bar
" in "_site/methods/configuration/index.html" + Scenario: Rendered document in a layout Given I have an "index.html" page that contains "Collections: {{ site.collections }}" And I have a default layout that contains " tags to code blocks
- code = code.sub(/\n*/,'')
+ code = code.sub(/\n*/,'')
code = code.sub(/\n*<\/pre>/,"
")
code.strip
end
diff --git a/lib/jekyll/url.rb b/lib/jekyll/url.rb
index 8cd47242..f4ea4d33 100644
--- a/lib/jekyll/url.rb
+++ b/lib/jekyll/url.rb
@@ -89,7 +89,7 @@ module Jekyll
# pct-encoded = "%" HEXDIG HEXDIG
# sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
# / "*" / "+" / "," / ";" / "="
- URI.escape(path, /[^a-zA-Z\d\-._~!$&\'()*+,;=:@\/]/)
+ URI.escape(path, /[^a-zA-Z\d\-._~!$&\'()*+,;=:@\/]/).encode('utf-8')
end
# Unescapes a URL path segment
@@ -103,7 +103,7 @@ module Jekyll
#
# Returns the unescaped path.
def self.unescape_path(path)
- URI.unescape(path)
+ URI.unescape(path.encode('utf-8'))
end
end
end
diff --git a/lib/jekyll/utils.rb b/lib/jekyll/utils.rb
index dc19a3e4..e1b4704d 100644
--- a/lib/jekyll/utils.rb
+++ b/lib/jekyll/utils.rb
@@ -35,17 +35,25 @@ module Jekyll
#
# Returns an array
def pluralized_array_from_hash(hash, singular_key, plural_key)
- if hash.has_key?(singular_key)
- array = [hash[singular_key]] if hash[singular_key]
- elsif hash.has_key?(plural_key)
- case hash[plural_key]
+ [].tap do |array|
+ array << (value_from_singular_key(hash, singular_key) || value_from_plural_key(hash, plural_key))
+ end.flatten.compact
+ end
+
+ def value_from_singular_key(hash, key)
+ hash[key] if (hash.has_key?(key) || (hash.default_proc && hash[key]))
+ end
+
+ def value_from_plural_key(hash, key)
+ if hash.has_key?(key) || (hash.default_proc && hash[key])
+ val = hash[key]
+ case val
when String
- array = hash[plural_key].split
+ val.split
when Array
- array = hash[plural_key].compact
+ val.compact
end
end
- array || []
end
def transform_keys(hash)
diff --git a/lib/jekyll/version.rb b/lib/jekyll/version.rb
index 18840a56..b61af28b 100644
--- a/lib/jekyll/version.rb
+++ b/lib/jekyll/version.rb
@@ -1,3 +1,3 @@
module Jekyll
- VERSION = '2.0.3'
+ VERSION = '2.1.0'
end
diff --git a/lib/site_template/_config.yml b/lib/site_template/_config.yml
index 2c0d7379..ae45638b 100644
--- a/lib/site_template/_config.yml
+++ b/lib/site_template/_config.yml
@@ -4,6 +4,8 @@ email: your-email@domain.com
description: "Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description."
baseurl: ""
url: "http://yourdomain.com"
+twitter_username: jekyllrb
+github_username: jekyll
# Build settings
markdown: kramdown
diff --git a/lib/site_template/_includes/footer.html b/lib/site_template/_includes/footer.html
index e9082174..0026c4c5 100644
--- a/lib/site_template/_includes/footer.html
+++ b/lib/site_template/_includes/footer.html
@@ -13,8 +13,8 @@
diff --git a/lib/site_template/_includes/header.html b/lib/site_template/_includes/header.html
index 36ff6cc6..e5e6f26a 100644
--- a/lib/site_template/_includes/header.html
+++ b/lib/site_template/_includes/header.html
@@ -18,7 +18,7 @@
{% for page in site.pages %}
- {{ page.title }}
+ {% if page.title %}{{ page.title }}{% endif %}
{% endfor %}
diff --git a/lib/site_template/css/main.css b/lib/site_template/css/main.css
index b94ca8fb..88090a3e 100644
--- a/lib/site_template/css/main.css
+++ b/lib/site_template/css/main.css
@@ -234,6 +234,7 @@ a:visited { color: #205caa; }
-moz-border-radius: 3px;
border-radius: 3px;
font-size: 15px;
+ overflow:scroll;
}
.post code { padding: 1px 5px; }
diff --git a/lib/site_template/feed.xml b/lib/site_template/feed.xml
index 234d1c0b..4d7f8a4c 100644
--- a/lib/site_template/feed.xml
+++ b/lib/site_template/feed.xml
@@ -8,13 +8,22 @@ layout: none
{{ site.description | xml_escape }}
{{ site.url }}{{ site.baseurl }}/
+ {{ site.time | date_to_rfc822 }}
+ {{ site.time | date_to_rfc822 }}
+ Jekyll v{{ jekyll.version }}
{% for post in site.posts limit:10 %}
-
{{ post.title | xml_escape }}
{{ post.content | xml_escape }}
- {{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}
+ {{ post.date | date_to_rfc822 }}
{{ post.url | prepend: site.baseurl | prepend: site.url }}
{{ post.url | prepend: site.baseurl | prepend: site.url }}
+ {% for tag in post.tags %}
+ {{ tag | xml_escape }}
+ {% endfor %}
+ {% for cat in post.categories %}
+ {{ cat | xml_escape }}
+ {% endfor %}
{% endfor %}
diff --git a/site/_config.yml b/site/_config.yml
index 44c2772e..0d4dacfd 100644
--- a/site/_config.yml
+++ b/site/_config.yml
@@ -7,3 +7,4 @@ excerpt_separator: noifniof3nioaniof3nioafafinoafnoif
repository: https://github.com/jekyll/jekyll
help_url: https://github.com/jekyll/jekyll-help
google_analytics_id: UA-50755011-1
+timezone: America/Los_Angeles
diff --git a/site/_data/docs.yml b/site/_data/docs.yml
index 7d0a83f3..474f73fa 100644
--- a/site/_data/docs.yml
+++ b/site/_data/docs.yml
@@ -31,6 +31,7 @@
docs:
- github-pages
- deployment-methods
+ - continuous-integration
- title: Miscellaneous
docs:
diff --git a/site/_includes/anchor_links.html b/site/_includes/anchor_links.html
index e9802071..08e37b5b 100644
--- a/site/_includes/anchor_links.html
+++ b/site/_includes/anchor_links.html
@@ -1,27 +1,32 @@
-
diff --git a/site/_includes/css/font-awesome.css b/site/_includes/css/font-awesome.css
index f864c27c..86435ecd 100644
--- a/site/_includes/css/font-awesome.css
+++ b/site/_includes/css/font-awesome.css
@@ -1,11 +1,11 @@
/*!
- * Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome
+ * Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/
@font-face {
font-family: 'FontAwesome';
- src: url('../fonts/fontawesome-webfont.eot?v=4.0.3');
- src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');
+ src: url('../fonts/fontawesome-webfont.eot?v=4.1.0');
+ src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}
diff --git a/site/_includes/css/style.css b/site/_includes/css/style.css
index e65c9065..18bc8330 100644
--- a/site/_includes/css/style.css
+++ b/site/_includes/css/style.css
@@ -590,6 +590,10 @@ article h2:first-child {
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9e2812', endColorstr='#6f0d0d',GradientType=0 );
}
+.post-content img {
+ max-width: 100%
+}
+
.label {
float: left;
text-transform: uppercase;
@@ -695,6 +699,7 @@ pre, code {
}
.highlight {
+ margin: 1em 0;
padding: 10px 0;
width: 100%;
overflow: auto;
diff --git a/site/_includes/news_contents.html b/site/_includes/news_contents.html
index f22a1a1a..5c545211 100644
--- a/site/_includes/news_contents.html
+++ b/site/_includes/news_contents.html
@@ -10,7 +10,7 @@
Recent Releases
- {% for post in site.posts limit:5 %}
+ {% for post in site.categories.release limit:5 %}
-
Version {{ post.version }}
@@ -19,5 +19,15 @@
History »
+ Other News
+
+ {% for post in site.posts %}
+ {% unless post.categories contains 'release' %}
+ -
+ {{ post.title }}
+
+ {% endunless %}
+ {% endfor %}
+
diff --git a/site/_includes/top.html b/site/_includes/top.html
index ffeddd9d..35ba2f26 100644
--- a/site/_includes/top.html
+++ b/site/_includes/top.html
@@ -10,7 +10,6 @@
- {% include anchor_links.html %}