From e5f1a400ee8a8daeef7e6263f15de43375fda915 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Sun, 12 Jan 2014 11:57:11 -0800 Subject: [PATCH 01/70] first pass at vision --- README.markdown | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 05ade2f9..a7961088 100644 --- a/README.markdown +++ b/README.markdown @@ -9,7 +9,11 @@ By Tom Preston-Werner, Nick Quaranto, and many awesome contributors! -Jekyll is a simple, blog aware, static site generator. It takes a template directory (representing the raw form of a website), runs it through Textile or Markdown and Liquid converters, and spits out a complete, static website suitable for serving with Apache or your favorite web server. This is also the engine behind [GitHub Pages](http://pages.github.com), which you can use to host your project's page or blog right here from GitHub. +Jekyll is a simple, blog aware, static site generator perfect for personal or project sites. Think of it sort of like a file-based CMS, except without all the complexity. Jekyll takes your content, runs it through Markdown converters and Liquid templates, and spits out a complete, static website suitable for serving with Apache, Nginx or your favorite web server. This is also the engine behind [GitHub Pages](http://pages.github.com), which you can use to host your project's page or blog right on GitHub. + +## Philosophy + +Jekyll does what you tell it to do, no more, no less. It doesn't try to outsmart users by making bold assumptions or burden them with needless complexity and configuration. Put simply, Jekyll gets out of your way and allows you to concentrate on what truly matters: your content. ## Getting Started From 824a84ef2aa46ca2d000f225091fa6acd0997f7a Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 Jan 2014 02:06:20 -0800 Subject: [PATCH 02/70] Add support for Sass and SCSS. --- jekyll.gemspec | 1 + lib/jekyll.rb | 1 + lib/jekyll/converters/sass.rb | 18 ++++++++++++++++++ lib/jekyll/converters/scss.rb | 18 ++++++++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 lib/jekyll/converters/sass.rb create mode 100644 lib/jekyll/converters/scss.rb diff --git a/jekyll.gemspec b/jekyll.gemspec index 1608ce76..1a8f1c96 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -53,6 +53,7 @@ Gem::Specification.new do |s| s.add_development_dependency('jekyll_test_plugin') s.add_development_dependency('jekyll_test_plugin_malicious') s.add_development_dependency('rouge', '~> 1.3') + s.add_development_dependency('sass', '~> 3.2') # = MANIFEST = s.files = %w[ diff --git a/lib/jekyll.rb b/lib/jekyll.rb index 4b45e2ba..02509040 100644 --- a/lib/jekyll.rb +++ b/lib/jekyll.rb @@ -27,6 +27,7 @@ require 'liquid' require 'maruku' require 'colorator' require 'toml' +require 'sass' # internal requires require 'jekyll/core_ext' diff --git a/lib/jekyll/converters/sass.rb b/lib/jekyll/converters/sass.rb new file mode 100644 index 00000000..a5f34518 --- /dev/null +++ b/lib/jekyll/converters/sass.rb @@ -0,0 +1,18 @@ +module Jekyll + class Sass < Converter + safe true + priority :low + + def matches(ext) + ext =~ /^\.sass$/i + end + + def output_ext(ext) + ".css" + end + + def convert(content) + Sass.compile(content, :syntax => :sass) + end + end +end diff --git a/lib/jekyll/converters/scss.rb b/lib/jekyll/converters/scss.rb new file mode 100644 index 00000000..de7c097f --- /dev/null +++ b/lib/jekyll/converters/scss.rb @@ -0,0 +1,18 @@ +module Jekyll + class Sass < Converter + safe true + priority :low + + def matches(ext) + ext =~ /^\.sass$/i + end + + def output_ext(ext) + ".css" + end + + def convert(content) + Sass.compile(content, :syntax => :scss) + end + end +end From 4da722383181a799b98e70df2169be63d81da15a Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 Jan 2014 02:18:59 -0800 Subject: [PATCH 03/70] Fixes for Sass/SCSS converters. --- lib/jekyll/converters/sass.rb | 2 +- lib/jekyll/converters/scss.rb | 6 +++--- test/test_sass.rb | 20 ++++++++++++++++++++ test/test_scss.rb | 21 +++++++++++++++++++++ 4 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 test/test_sass.rb create mode 100644 test/test_scss.rb diff --git a/lib/jekyll/converters/sass.rb b/lib/jekyll/converters/sass.rb index a5f34518..aacf2a86 100644 --- a/lib/jekyll/converters/sass.rb +++ b/lib/jekyll/converters/sass.rb @@ -12,7 +12,7 @@ module Jekyll end def convert(content) - Sass.compile(content, :syntax => :sass) + Object::Sass.compile(content, :syntax => :sass) end end end diff --git a/lib/jekyll/converters/scss.rb b/lib/jekyll/converters/scss.rb index de7c097f..27a4e85f 100644 --- a/lib/jekyll/converters/scss.rb +++ b/lib/jekyll/converters/scss.rb @@ -1,10 +1,10 @@ module Jekyll - class Sass < Converter + class Scss < Converter safe true priority :low def matches(ext) - ext =~ /^\.sass$/i + ext =~ /^\.scss$/i end def output_ext(ext) @@ -12,7 +12,7 @@ module Jekyll end def convert(content) - Sass.compile(content, :syntax => :scss) + ::Sass.compile(content, :syntax => :scss) end end end diff --git a/test/test_sass.rb b/test/test_sass.rb new file mode 100644 index 00000000..0fa44d21 --- /dev/null +++ b/test/test_sass.rb @@ -0,0 +1,20 @@ +require 'helper' + +class TestSass < Test::Unit::TestCase + context "converting sass" do + setup do + @content = <<-SASS +$font-stack: Helvetica, sans-serif +body + font-family: $font-stack + font-color: fuschia +SASS + @output = <<-CSS +body {\n font-family: Helvetica, sans-serif;\n font-color: fuschia; } +CSS + end + should "produce CSS" do + assert_equal @output, Jekyll::Sass.new.convert(@content) + end + end +end diff --git a/test/test_scss.rb b/test/test_scss.rb new file mode 100644 index 00000000..dbc40d83 --- /dev/null +++ b/test/test_scss.rb @@ -0,0 +1,21 @@ +require 'helper' + +class TestSass < Test::Unit::TestCase + context "converting SCSS" do + setup do + @content = <<-SCSS +$font-stack: Helvetica, sans-serif; +body { + font-family: $font-stack; + font-color: fuschia; +} +SCSS + @output = <<-CSS +body {\n font-family: Helvetica, sans-serif;\n font-color: fuschia; } +CSS + end + should "produce CSS" do + assert_equal @output, Jekyll::Scss.new.convert(@content) + end + end +end From daa0b76484453d6af038a2dc19a0833040ebefbe Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 Jan 2014 14:44:00 -0800 Subject: [PATCH 04/70] Allow users to specify options for Sass. --- lib/jekyll/converters/sass.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/jekyll/converters/sass.rb b/lib/jekyll/converters/sass.rb index aacf2a86..6cb2ff67 100644 --- a/lib/jekyll/converters/sass.rb +++ b/lib/jekyll/converters/sass.rb @@ -11,8 +11,12 @@ module Jekyll ".css" end + def sass_build_configuration_options(overrides) + (@config["sass"] || {}).deep_merge(overrides) + end + def convert(content) - Object::Sass.compile(content, :syntax => :sass) + ::Sass.compile(content, sass_build_configuration_options({"syntax" => :sass})) end end end From 22d4e2aa9005305c727b9bc110af928d8eb78a6d Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 Jan 2014 14:58:17 -0800 Subject: [PATCH 05/70] Consolidate into one master 'Sass' converter. --- lib/jekyll/converters/sass.rb | 32 +++++++++++++++++++++++++++++--- lib/jekyll/converters/scss.rb | 18 ------------------ test/test_sass.rb | 18 ++++++++++++++++++ test/test_scss.rb | 21 --------------------- 4 files changed, 47 insertions(+), 42 deletions(-) delete mode 100644 lib/jekyll/converters/scss.rb delete mode 100644 test/test_scss.rb diff --git a/lib/jekyll/converters/sass.rb b/lib/jekyll/converters/sass.rb index 6cb2ff67..177b62e6 100644 --- a/lib/jekyll/converters/sass.rb +++ b/lib/jekyll/converters/sass.rb @@ -4,7 +4,7 @@ module Jekyll priority :low def matches(ext) - ext =~ /^\.sass$/i + ext =~ /^\.s(a|c)ss$/i end def output_ext(ext) @@ -12,11 +12,37 @@ module Jekyll end def sass_build_configuration_options(overrides) - (@config["sass"] || {}).deep_merge(overrides) + (@config["sass"] || {}).deep_merge(overrides).symbolize_keys + end + + def syntax_type_of_content(content) + if content.include?(";") || content.include?("{") + :scss + else + :sass + end + end + + def sass_dir + @config["source"]["sass"]["sass_dir"] || "_sass" + end + + def sass_dir_relative_to_site_source + File.join( + @config["source"], + File.expand_path("/", sass_dir) + ) end def convert(content) - ::Sass.compile(content, sass_build_configuration_options({"syntax" => :sass})) + syntax = syntax_type_of_content(content) + configs = sass_build_configuration_options({ + "syntax" => syntax_type_of_content(content), + "cache" => false, + "filesystem_importer" => NilClass, + "load_paths" => sass_dir_relative_to_site_source + }) + ::Sass.compile(content, configs) end end end diff --git a/lib/jekyll/converters/scss.rb b/lib/jekyll/converters/scss.rb deleted file mode 100644 index 27a4e85f..00000000 --- a/lib/jekyll/converters/scss.rb +++ /dev/null @@ -1,18 +0,0 @@ -module Jekyll - class Scss < Converter - safe true - priority :low - - def matches(ext) - ext =~ /^\.scss$/i - end - - def output_ext(ext) - ".css" - end - - def convert(content) - ::Sass.compile(content, :syntax => :scss) - end - end -end diff --git a/test/test_sass.rb b/test/test_sass.rb index 0fa44d21..aa57f874 100644 --- a/test/test_sass.rb +++ b/test/test_sass.rb @@ -11,6 +11,24 @@ body SASS @output = <<-CSS body {\n font-family: Helvetica, sans-serif;\n font-color: fuschia; } +CSS + end + should "produce CSS" do + assert_equal @output, Jekyll::Sass.new.convert(@content) + end + end + + context "converting SCSS" do + setup do + @content = <<-SCSS +$font-stack: Helvetica, sans-serif; +body { + font-family: $font-stack; + font-color: fuschia; +} +SCSS + @output = <<-CSS +body {\n font-family: Helvetica, sans-serif;\n font-color: fuschia; } CSS end should "produce CSS" do diff --git a/test/test_scss.rb b/test/test_scss.rb deleted file mode 100644 index dbc40d83..00000000 --- a/test/test_scss.rb +++ /dev/null @@ -1,21 +0,0 @@ -require 'helper' - -class TestSass < Test::Unit::TestCase - context "converting SCSS" do - setup do - @content = <<-SCSS -$font-stack: Helvetica, sans-serif; -body { - font-family: $font-stack; - font-color: fuschia; -} -SCSS - @output = <<-CSS -body {\n font-family: Helvetica, sans-serif;\n font-color: fuschia; } -CSS - end - should "produce CSS" do - assert_equal @output, Jekyll::Scss.new.convert(@content) - end - end -end From 4784d1de184cf8c50441fbb5ea4c566d536287c0 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 Jan 2014 15:28:53 -0800 Subject: [PATCH 06/70] Build Sass configuration options. --- lib/jekyll/converters/sass.rb | 23 ++++++---- test/test_sass.rb | 85 ++++++++++++++++++++++++++++------- 2 files changed, 84 insertions(+), 24 deletions(-) diff --git a/lib/jekyll/converters/sass.rb b/lib/jekyll/converters/sass.rb index 177b62e6..424a1fbc 100644 --- a/lib/jekyll/converters/sass.rb +++ b/lib/jekyll/converters/sass.rb @@ -11,8 +11,12 @@ module Jekyll ".css" end + def user_sass_configs + @config["sass"] || {} + end + def sass_build_configuration_options(overrides) - (@config["sass"] || {}).deep_merge(overrides).symbolize_keys + user_sass_configs.deep_merge(overrides).symbolize_keys end def syntax_type_of_content(content) @@ -24,25 +28,26 @@ module Jekyll end def sass_dir - @config["source"]["sass"]["sass_dir"] || "_sass" + user_sass_configs["sass_dir"] || "_sass" end def sass_dir_relative_to_site_source File.join( @config["source"], - File.expand_path("/", sass_dir) + File.expand_path(sass_dir, "/") ) end - def convert(content) - syntax = syntax_type_of_content(content) - configs = sass_build_configuration_options({ + def sass_configs(content = "") + sass_build_configuration_options({ "syntax" => syntax_type_of_content(content), "cache" => false, - "filesystem_importer" => NilClass, - "load_paths" => sass_dir_relative_to_site_source + "load_paths" => [sass_dir_relative_to_site_source] }) - ::Sass.compile(content, configs) + end + + def convert(content) + ::Sass.compile(content, sass_configs(content)) end end end diff --git a/test/test_sass.rb b/test/test_sass.rb index aa57f874..5e32b5cc 100644 --- a/test/test_sass.rb +++ b/test/test_sass.rb @@ -1,38 +1,93 @@ require 'helper' class TestSass < Test::Unit::TestCase - context "converting sass" do - setup do - @content = <<-SASS + def site_configuration(overrides = {}) + Jekyll::Configuration::DEFAULTS.deep_merge(overrides).deep_merge({ + "source" => source_dir, + "destination" => dest_dir + }) + end + + def converter(overrides = {}) + Jekyll::Sass.new(site_configuration({"sass" => overrides})) + end + + def sass_content + <<-SASS $font-stack: Helvetica, sans-serif body font-family: $font-stack font-color: fuschia SASS - @output = <<-CSS -body {\n font-family: Helvetica, sans-serif;\n font-color: fuschia; } -CSS - end - should "produce CSS" do - assert_equal @output, Jekyll::Sass.new.convert(@content) - end end - context "converting SCSS" do - setup do - @content = <<-SCSS + def scss_content + <<-SCSS $font-stack: Helvetica, sans-serif; body { font-family: $font-stack; font-color: fuschia; } SCSS - @output = <<-CSS + end + + def css_output + <<-CSS body {\n font-family: Helvetica, sans-serif;\n font-color: fuschia; } CSS + end + + context "matching file extensions" do + should "match .scss files" do + assert converter.matches(".scss") end + + should "match .sass files" do + assert converter.matches(".sass") + end + end + + context "determining the output file extension" do + should "output .css file extension" do + assert_equal ".css", converter.output_ext(".sass") + end + end + + context "when building configurations" do + should "not allow caching" do + assert_equal false, converter.sass_configs[:cache] + end + + should "set the load paths to the _sass dir relative to site source" do + assert_equal [source_dir("_sass")], converter.sass_configs[:load_paths] + end + + should "allow the user to specify a different sass dir" do + assert_equal [source_dir("_scss")], converter({"sass_dir" => "_scss"}).sass_configs[:load_paths] + end + + should "set syntax :scss when SCSS content" do + assert_equal :scss, converter.sass_configs(scss_content)[:syntax] + end + + should "set syntax :sass when Sass content" do + assert_equal :sass, converter.sass_configs(sass_content)[:syntax] + end + + should "default to :sass syntax when content is empty" do + assert_equal :sass, converter.sass_configs[:syntax] + end + end + + context "converting sass" do should "produce CSS" do - assert_equal @output, Jekyll::Sass.new.convert(@content) + assert_equal css_output, converter.convert(sass_content) + end + end + + context "converting SCSS" do + should "produce CSS" do + assert_equal css_output, converter.convert(scss_content) end end end From 8ecd2d9218c4ea7e9e92b29e1169e989b9461a5f Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 Jan 2014 15:37:09 -0800 Subject: [PATCH 07/70] Don't allow path traversal or syntax overrides. --- test/test_sass.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test_sass.rb b/test/test_sass.rb index 5e32b5cc..46f55f13 100644 --- a/test/test_sass.rb +++ b/test/test_sass.rb @@ -77,6 +77,14 @@ CSS should "default to :sass syntax when content is empty" do assert_equal :sass, converter.sass_configs[:syntax] end + + should "not allow sass_dirs outside of site source" do + assert_equal source_dir("etc/passwd"), converter({"sass_dir" => "/etc/passwd"}).sass_dir_relative_to_site_source + end + + should "override user-set syntax based on content" do + assert_equal :sass, converter({"syntax" => :scss}).sass_configs(sass_content)[:syntax] + end end context "converting sass" do From ecf85a9cfa830167cf3afe87d1361462a3424e39 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 Jan 2014 15:38:26 -0800 Subject: [PATCH 08/70] Does not allow caching. This was done to prevent putting the .sass-cache folder in bad places. Needed? cc @benbalter. --- test/test_sass.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_sass.rb b/test/test_sass.rb index 46f55f13..bc49a227 100644 --- a/test/test_sass.rb +++ b/test/test_sass.rb @@ -85,6 +85,10 @@ CSS should "override user-set syntax based on content" do assert_equal :sass, converter({"syntax" => :scss}).sass_configs(sass_content)[:syntax] end + + should "override user-set cache setting" do + assert_equal false, converter("cache" => true).sass_configs[:cache] + end end context "converting sass" do From 66732b91c1e618e91dffc01903856773129efe12 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 Jan 2014 15:39:17 -0800 Subject: [PATCH 09/70] Make sass a runtime dependency. --- jekyll.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jekyll.gemspec b/jekyll.gemspec index 1a8f1c96..04a20e23 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -34,6 +34,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency('colorator', "~> 0.1") s.add_runtime_dependency('redcarpet', "~> 3.0") s.add_runtime_dependency('toml', '~> 0.1.0') + s.add_runtime_dependency('sass', '~> 3.2') s.add_development_dependency('rake', "~> 10.1") s.add_development_dependency('rdoc', "~> 3.11") @@ -53,7 +54,6 @@ Gem::Specification.new do |s| s.add_development_dependency('jekyll_test_plugin') s.add_development_dependency('jekyll_test_plugin_malicious') s.add_development_dependency('rouge', '~> 1.3') - s.add_development_dependency('sass', '~> 3.2') # = MANIFEST = s.files = %w[ From 6b92126fd8f9634beeb68a100339c8d8bc151f04 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 Jan 2014 21:28:54 -0800 Subject: [PATCH 10/70] Add docs for Sass conversion. --- site/_includes/docs_contents.html | 2 +- site/_includes/docs_contents_mobile.html | 2 +- site/docs/assets.md | 46 ++++++++++++++++++++++++ site/docs/datafiles.md | 10 +++--- site/docs/migrations.md | 2 +- 5 files changed, 54 insertions(+), 8 deletions(-) create mode 100644 site/docs/assets.md diff --git a/site/_includes/docs_contents.html b/site/_includes/docs_contents.html index 523b5227..bed2a66c 100644 --- a/site/_includes/docs_contents.html +++ b/site/_includes/docs_contents.html @@ -3,7 +3,7 @@

Getting Started

{% include docs_ul.html items='home quickstart installation usage structure configuration' %}

Your Content

- {% include docs_ul.html items='frontmatter posts drafts pages variables datafiles migrations' %} + {% include docs_ul.html items='frontmatter posts drafts pages variables datafiles assets migrations' %}

Customization

{% include docs_ul.html items='templates permalinks pagination plugins extras' %}

Deployment

diff --git a/site/_includes/docs_contents_mobile.html b/site/_includes/docs_contents_mobile.html index bbc367d4..6313a59f 100644 --- a/site/_includes/docs_contents_mobile.html +++ b/site/_includes/docs_contents_mobile.html @@ -5,7 +5,7 @@ {% include docs_option.html items='home quickstart installation usage structure configuration' %} - {% include docs_option.html items='frontmatter posts drafts pages variables datafiles migrations' %} + {% include docs_option.html items='frontmatter posts drafts pages variables datafiles assets migrations' %} {% include docs_option.html items='templates permalinks pagination plugins extras' %} diff --git a/site/docs/assets.md b/site/docs/assets.md new file mode 100644 index 00000000..5191dc15 --- /dev/null +++ b/site/docs/assets.md @@ -0,0 +1,46 @@ +--- +layout: docs +title: Assets +prev_section: datafiles +next_section: migrations +permalink: /docs/assets/ +--- + +Jekyll provides built-in support for Sass and CoffeeScript. In order to use +them, create a file with the proper extension name (one of `.sass`, `.scss`, +or `.coffee`) and start the file with two lines of triple dashes, like this: + +{% highlight sass %} +--- +--- + +// start content +.my-definition + font-size: 1.2em +{% endhighlight %} + +## Sass/SCSS + +Jekyll allows you to customize your Sass conversion in certain ways. + +If you are using Sass `@import` statements, you'll need to ensure that your +`sass_dir` is set to the base directory that contains your Sass files. You +can do that thusly: + +{% highlight yaml %} +sass: + sass_dir: _sass +{% endhighlight %} + +The Sass converter will default to `_sass`. + +You may also specify the output style with the `style` option in your +`_config.yml` file: + +{% highlight yaml %} +sass: + style: :compressed +{% endhighlight %} + +These are passed to Sass, so any output style options Sass supports are valid +here, too. diff --git a/site/docs/datafiles.md b/site/docs/datafiles.md index b3421c38..55af6ec4 100644 --- a/site/docs/datafiles.md +++ b/site/docs/datafiles.md @@ -2,25 +2,25 @@ layout: docs title: Data Files prev_section: variables -next_section: migrations +next_section: assets permalink: /docs/datafiles/ --- In addition to the [built-in variables](../variables/) available from Jekyll, -you can specify your own custom data that can be accessed via the [Liquid +you can specify your own custom data that can be accessed via the [Liquid templating system](http://wiki.github.com/shopify/liquid/liquid-for-designers). -Jekyll supports loading data from [YAML](http://yaml.org/) files located in the +Jekyll supports loading data from [YAML](http://yaml.org/) files located in the `_data` directory. This powerful feature allows you to avoid repetition in your templates and to -set site specific options without changing `_config.yml`. +set site specific options without changing `_config.yml`. Plugins/themes can also leverage Data Files to set configuration variables. ## The Data Folder -As explained on the [directory structure](../structure/) page, the `_data` +As explained on the [directory structure](../structure/) page, the `_data` folder is where you can store additional data for Jekyll to use when generating your site. These files must be YAML files (using either the `.yml` or `.yaml` extension) and they will be accessible via `site.data`. diff --git a/site/docs/migrations.md b/site/docs/migrations.md index 27ecf71d..f9ecc1f5 100644 --- a/site/docs/migrations.md +++ b/site/docs/migrations.md @@ -1,7 +1,7 @@ --- layout: docs title: Blog migrations -prev_section: datafiles +prev_section: assets next_section: templates permalink: /docs/migrations/ --- From 4afe39e4611fb466abd58c36c2fe0da1dcf6fd6c Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 Jan 2014 21:36:08 -0800 Subject: [PATCH 11/70] Allow caching in unsafe mode, but disable in safe mode. --- lib/jekyll/converters/sass.rb | 6 +++++- test/test_sass.rb | 14 ++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/jekyll/converters/sass.rb b/lib/jekyll/converters/sass.rb index 424a1fbc..0401ffb3 100644 --- a/lib/jekyll/converters/sass.rb +++ b/lib/jekyll/converters/sass.rb @@ -38,10 +38,14 @@ module Jekyll ) end + def allow_caching? + !@config["safe"] + end + def sass_configs(content = "") sass_build_configuration_options({ "syntax" => syntax_type_of_content(content), - "cache" => false, + "cache" => allow_caching?, "load_paths" => [sass_dir_relative_to_site_source] }) end diff --git a/test/test_sass.rb b/test/test_sass.rb index bc49a227..477ef203 100644 --- a/test/test_sass.rb +++ b/test/test_sass.rb @@ -54,8 +54,14 @@ CSS end context "when building configurations" do - should "not allow caching" do - assert_equal false, converter.sass_configs[:cache] + should "not allow caching in safe mode" do + verter = converter + verter.instance_variable_get(:@config)["safe"] = true + assert_equal false, verter.sass_configs[:cache] + end + + should "allow caching in unsafe mode" do + assert_equal true, converter.sass_configs[:cache] end should "set the load paths to the _sass dir relative to site source" do @@ -85,10 +91,6 @@ CSS should "override user-set syntax based on content" do assert_equal :sass, converter({"syntax" => :scss}).sass_configs(sass_content)[:syntax] end - - should "override user-set cache setting" do - assert_equal false, converter("cache" => true).sass_configs[:cache] - end end context "converting sass" do From edc9ffcb6518c4a21d6256023670492089244c84 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Mon, 13 Jan 2014 22:26:38 -0800 Subject: [PATCH 12/70] Add 1.4.3 release post by @BenBalter for master branch. --- .../2014-01-13-jekyll-1-4-3-released.markdown | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 site/_posts/2014-01-13-jekyll-1-4-3-released.markdown diff --git a/site/_posts/2014-01-13-jekyll-1-4-3-released.markdown b/site/_posts/2014-01-13-jekyll-1-4-3-released.markdown new file mode 100644 index 00000000..a97bcec4 --- /dev/null +++ b/site/_posts/2014-01-13-jekyll-1-4-3-released.markdown @@ -0,0 +1,26 @@ +--- +layout: news_item +title: 'Jekyll 1.4.3 Released' +date: 2014-01-13 17:43:32 -0800 +author: benbalter +version: 1.4.3 +categories: [release] +--- + +Jekyll 1.4.3 contains two **critical** security fixes. If you run Jekyll locally +and do not run Jekyll in "safe" mode (e.g. you do not build Jekyll sites on behalf +of others), you are not affected and are not required to update at this time. +([See pull request.]({{ site.repository }}/pull/1944)) + +Versions of Jekyll prior to 1.4.3 and greater than 1.2.0 may allow malicious +users to expose the content of files outside the source directory in the +generated output via improper symlink sanitization, potentially resulting in an +inadvertent information disclosure. + +Versions of Jekyll prior to 1.4.3 may also allow malicious users to write +arbitrary `.html` files outside of the destination folder via relative path +traversal, potentially overwriting otherwise-trusted content with arbitrary HTML +or Javascript depending on your server's configuration. + +*Maintainer's note: Many thanks to @gregose and @charliesome for discovering +these vulnerabilities, and to @BenBalter and @alindeman for writing the patch.* From e87cd8d53ce979861070af11345e21d7f121e6f1 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Mon, 13 Jan 2014 22:27:41 -0800 Subject: [PATCH 13/70] Update History.markdown with 1.4.3 release. --- History.markdown | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/History.markdown b/History.markdown index 9145f044..26df264c 100644 --- a/History.markdown +++ b/History.markdown @@ -75,6 +75,11 @@ * Linkify 'awesome contributors' to point to the contributors graph on GitHub (#1940) +## 1.4.3 / 2014-01-13 + +### Bug Fixes + * Patch show-stopping security vulnerabilities (#1944) + ## 1.4.2 / 2013-12-16 ### Bug Fixes From 245597c2dbe0efb5f72c11b14fdc96c3fa5d4b5a Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Mon, 13 Jan 2014 22:28:16 -0800 Subject: [PATCH 14/70] Require Liquid 2.5.5 <= x < 2.6 --- jekyll.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jekyll.gemspec b/jekyll.gemspec index 1608ce76..7fe6c10d 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -24,7 +24,7 @@ Gem::Specification.new do |s| s.rdoc_options = ["--charset=UTF-8"] s.extra_rdoc_files = %w[README.markdown LICENSE] - s.add_runtime_dependency('liquid', "~> 2.5.2") + s.add_runtime_dependency('liquid', "~> 2.5.5") s.add_runtime_dependency('classifier', "~> 1.3") s.add_runtime_dependency('listen', "~> 1.3") s.add_runtime_dependency('maruku', "~> 0.7.0") From 45c0523e553e9fb270746175a5cf5fea009f9a78 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 14 Jan 2014 08:43:29 -0800 Subject: [PATCH 15/70] update dat gemspec --- jekyll.gemspec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jekyll.gemspec b/jekyll.gemspec index 7fe6c10d..e3d74185 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -128,6 +128,8 @@ Gem::Specification.new do |s| lib/site_template/css/syntax.css lib/site_template/index.html script/bootstrap + script/branding + script/cibuild site/.gitignore site/CNAME site/README @@ -167,6 +169,9 @@ Gem::Specification.new do |s| site/_posts/2013-11-04-jekyll-1-3-0-released.markdown site/_posts/2013-11-26-jekyll-1-3-1-released.markdown site/_posts/2013-12-07-jekyll-1-4-0-released.markdown + site/_posts/2013-12-09-jekyll-1-4-1-released.markdown + site/_posts/2013-12-16-jekyll-1-4-2-released.markdown + site/_posts/2014-01-13-jekyll-1-4-3-released.markdown site/css/screen.css site/docs/configuration.md site/docs/contributing.md @@ -195,6 +200,7 @@ Gem::Specification.new do |s| site/docs/upgrading.md site/docs/usage.md site/docs/variables.md + site/docs/windows.md site/favicon.png site/feed.xml site/freenode.txt @@ -221,6 +227,7 @@ Gem::Specification.new do |s| test/source/_data/languages.yml test/source/_data/members.yaml test/source/_data/products.yml + test/source/_includes/include.html test/source/_includes/params.html test/source/_includes/sig.markdown test/source/_layouts/default.html @@ -260,6 +267,8 @@ Gem::Specification.new do |s| test/source/_posts/2013-05-10-number-category.textile test/source/_posts/2013-07-22-post-excerpt-with-layout.markdown test/source/_posts/2013-08-01-mkdn-extension.mkdn + test/source/_posts/2013-12-17-include-variable-filters.markdown + test/source/_posts/2013-12-20-properties.text test/source/_posts/es/2008-11-21-nested.textile test/source/about.html test/source/category/_posts/2008-9-23-categories.textile @@ -271,6 +280,7 @@ Gem::Specification.new do |s| test/source/foo/_posts/bar/2008-12-12-topical-post.textile test/source/index.html test/source/products.yml + test/source/properties.html test/source/sitemap.xml test/source/symlink-test/_data test/source/symlink-test/symlinked-dir From dc599121a07e31c736c2d0bf44fffe9a3a9d8401 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 14 Jan 2014 08:43:53 -0800 Subject: [PATCH 16/70] Update history to reflect merge of #1943 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 9145f044..787f8a52 100644 --- a/History.markdown +++ b/History.markdown @@ -51,6 +51,7 @@ (#1927) * Rename `read_things` to `read_content` (#1928) * Add `script/branding` script for ASCII art lovin' (#1936) + * Update the README to reflect the repo move ### Site Enhancements * Document Kramdown's GFM parser option (#1791) From b3064a9b7dda641564e525f8a0737a25b1a322bd Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 14 Jan 2014 08:44:20 -0800 Subject: [PATCH 17/70] Forgot #1943 in the line, whoopsie --- History.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.markdown b/History.markdown index 787f8a52..01c820ad 100644 --- a/History.markdown +++ b/History.markdown @@ -51,7 +51,7 @@ (#1927) * Rename `read_things` to `read_content` (#1928) * Add `script/branding` script for ASCII art lovin' (#1936) - * Update the README to reflect the repo move + * Update the README to reflect the repo move (#1943) ### Site Enhancements * Document Kramdown's GFM parser option (#1791) From ea94e5dd1cffe3fe7ba1cf480ad7415214b2ca50 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 14 Jan 2014 08:56:28 -0800 Subject: [PATCH 18/70] Update history to reflect merge of #1949 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 01c820ad..f57a3da1 100644 --- a/History.markdown +++ b/History.markdown @@ -75,6 +75,7 @@ * Add additional info about the new exclude behavior (#1938) * Linkify 'awesome contributors' to point to the contributors graph on GitHub (#1940) + * Update `docs/sites.md` link to GitHub Training materials (#1949) ## 1.4.2 / 2013-12-16 From 7f3b35191c541ed8dae36b38ef24d4538ab52d17 Mon Sep 17 00:00:00 2001 From: Troy Swanson Date: Tue, 14 Jan 2014 21:48:08 -0600 Subject: [PATCH 19/70] Make doc menus more reusable --- site/_data/docs.yml | 43 ++++++++++++++++++++++++ site/_includes/docs_contents.html | 16 +++------ site/_includes/docs_contents_mobile.html | 21 +++--------- site/_includes/docs_option.html | 2 +- site/_includes/docs_ul.html | 4 +-- 5 files changed, 54 insertions(+), 32 deletions(-) create mode 100644 site/_data/docs.yml diff --git a/site/_data/docs.yml b/site/_data/docs.yml new file mode 100644 index 00000000..4e89bcb2 --- /dev/null +++ b/site/_data/docs.yml @@ -0,0 +1,43 @@ +- title: Getting Started + docs: + - home + - quickstart + - installation + - usage + - structure + - configuration + +- title: Your Content + docs: + - frontmatter + - posts + - drafts + - pages + - variables + - datafiles + - migrations + +- title: Customization + docs: + - templates + - permalinks + - pagination + - plugins + - extras + +- title: Deployment + docs: + - github-pages + - deployment-methods + +- title: Miscellaneous + docs: + - troubleshooting + - sites + - resources + - upgrading + +- title: Meta + docs: + - contributing + - history diff --git a/site/_includes/docs_contents.html b/site/_includes/docs_contents.html index 523b5227..2ac64bb4 100644 --- a/site/_includes/docs_contents.html +++ b/site/_includes/docs_contents.html @@ -1,16 +1,8 @@
diff --git a/site/_includes/docs_contents_mobile.html b/site/_includes/docs_contents_mobile.html index bbc367d4..b3e0110c 100644 --- a/site/_includes/docs_contents_mobile.html +++ b/site/_includes/docs_contents_mobile.html @@ -1,23 +1,10 @@
diff --git a/site/_includes/docs_option.html b/site/_includes/docs_option.html index 8284ed96..a1e29cac 100644 --- a/site/_includes/docs_option.html +++ b/site/_includes/docs_option.html @@ -1,4 +1,4 @@ -{% assign items = include.items | split: ' ' %} +{% assign items = include.items %} {% for item in items %} {% assign item_url = item | prepend:'/docs/' | append:'/' %} diff --git a/site/_includes/docs_ul.html b/site/_includes/docs_ul.html index 4ba82479..99ac26ef 100644 --- a/site/_includes/docs_ul.html +++ b/site/_includes/docs_ul.html @@ -1,4 +1,4 @@ -{% assign items = include.items | split: ' ' %} +{% assign items = include.items %}
    {% for item in items %} @@ -16,5 +16,5 @@ {% endif %} {% endfor %} -{% endfor %} +{% endfor %}
From 4c140efba8ae49946de92a1acb40ead4ccd00ffb Mon Sep 17 00:00:00 2001 From: Jens Nazarenus Date: Tue, 14 Jan 2014 22:56:47 +0100 Subject: [PATCH 20/70] fix full path leak to source directory when using include tag --- lib/jekyll/tags/include.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb index 5c679dc1..adc7c2bf 100644 --- a/lib/jekyll/tags/include.rb +++ b/lib/jekyll/tags/include.rb @@ -102,7 +102,7 @@ eos validate_file_name(file) path = File.join(dir, file) - validate_file(path, context.registers[:site].safe) + validate_file(context.registers[:site].source, path, context.registers[:site].safe) begin partial = Liquid::Template.parse(source(path, context)) @@ -122,11 +122,12 @@ eos end end - def validate_file(file, safe) + def validate_file(sourcedir, file, safe) + relative_file = Pathname.new(file).relative_path_from(Pathname.new(sourcedir)) if !File.exists?(file) - raise IOError.new "Included file '#{file}' not found" + raise IOError.new "Included file '#{relative_file}' not found" elsif File.symlink?(file) && safe - raise IOError.new "The included file '#{file}' should not be a symlink" + raise IOError.new "The included file '#{relative_file}' should not be a symlink" end end From 0be62fa2e033658624fd4a538db10740ccead6ae Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Wed, 15 Jan 2014 22:13:31 -0600 Subject: [PATCH 21/70] Update history to reflect merge of #1947 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index fc8d4486..767eb4ad 100644 --- a/History.markdown +++ b/History.markdown @@ -76,6 +76,7 @@ * Linkify 'awesome contributors' to point to the contributors graph on GitHub (#1940) * Update `docs/sites.md` link to GitHub Training materials (#1949) + * Update `master` with the release info from 1.4.3 (#1947) ## 1.4.3 / 2014-01-13 From 824d9f6ca8ece2029ce6d5eeb7e7030201b6714f Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Wed, 15 Jan 2014 22:49:33 -0600 Subject: [PATCH 22/70] Better express that the converter always outputs css --- test/test_sass.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_sass.rb b/test/test_sass.rb index 477ef203..63e172e7 100644 --- a/test/test_sass.rb +++ b/test/test_sass.rb @@ -49,7 +49,7 @@ CSS context "determining the output file extension" do should "output .css file extension" do - assert_equal ".css", converter.output_ext(".sass") + assert_equal ".css", converter.output_ext(".always-css") end end From 10e5ecfe53ac104bdbc64fbac624697e0e536836 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Wed, 15 Jan 2014 22:49:33 -0600 Subject: [PATCH 23/70] Improve the test description for the outputs_ext test --- test/test_sass.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_sass.rb b/test/test_sass.rb index 63e172e7..d13fbcfe 100644 --- a/test/test_sass.rb +++ b/test/test_sass.rb @@ -48,7 +48,7 @@ CSS end context "determining the output file extension" do - should "output .css file extension" do + should "always outputs the .css file extension" do assert_equal ".css", converter.output_ext(".always-css") end end From 3b485b449702da21550452e960148abf5a3a4c6f Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Wed, 15 Jan 2014 23:11:27 -0600 Subject: [PATCH 24/70] Lock Maruku to 0.7.0 This fixes the errors we see in our tests due to the upgrade to Maruku 0.7.1 --- jekyll.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jekyll.gemspec b/jekyll.gemspec index e3d74185..a891f0bb 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -27,7 +27,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency('liquid', "~> 2.5.5") s.add_runtime_dependency('classifier', "~> 1.3") s.add_runtime_dependency('listen', "~> 1.3") - s.add_runtime_dependency('maruku', "~> 0.7.0") + s.add_runtime_dependency('maruku', "0.7.0") s.add_runtime_dependency('pygments.rb', "~> 0.5.0") s.add_runtime_dependency('mercenary', "~> 0.2.0") s.add_runtime_dependency('safe_yaml', "~> 1.0") From 8337cbb31ff6d384bce5919cda7f1e7cdb12c0e8 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Wed, 15 Jan 2014 23:24:24 -0600 Subject: [PATCH 25/70] Update history to reflect merge of #1958 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 767eb4ad..8ac542da 100644 --- a/History.markdown +++ b/History.markdown @@ -38,6 +38,7 @@ * Change short opts for host and port for `jekyll docs` to be consistent with other subcommands (#1877) * Fix typos (#1910) + * Lock Maruku at 0.7.0 to prevent bugs caused by Maruku 0.7.1 (#1958) ### Development Fixes * Add a link to the site in the README.md file (#1795) From e7139cbd8572e7c6f5d9dc1023197333a54882d3 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Wed, 15 Jan 2014 23:40:17 -0800 Subject: [PATCH 26/70] Update history to reflect merge of #1953 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 8ac542da..a2a116c6 100644 --- a/History.markdown +++ b/History.markdown @@ -78,6 +78,7 @@ GitHub (#1940) * Update `docs/sites.md` link to GitHub Training materials (#1949) * Update `master` with the release info from 1.4.3 (#1947) + * Define docs nav in datafile (#1953) ## 1.4.3 / 2014-01-13 From 82bee23bd048983e2e11e654754e67359419c5b6 Mon Sep 17 00:00:00 2001 From: Jens Nazarenus Date: Wed, 15 Jan 2014 21:35:55 +0100 Subject: [PATCH 27/70] added tests for full path leak to source directory when using include tag --- test/test_tags.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/test_tags.rb b/test/test_tags.rb index 8ecaf19b..efc108bd 100644 --- a/test/test_tags.rb +++ b/test/test_tags.rb @@ -487,6 +487,25 @@ CONTENT end end + context "include missing file" do + setup do + @content = < 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true}) + end + assert_equal 'Included file \'_includes/missing.html\' not found', exception.message + end + end + context "include tag with variable and liquid filters" do setup do stub(Jekyll).configuration do From 09a5d66b3e72789ffb77d86a9d76bd44f1e0a50e Mon Sep 17 00:00:00 2001 From: Joel Glovier Date: Thu, 16 Jan 2014 13:18:52 -0500 Subject: [PATCH 28/70] Update post.md with additional info about excerpt Adds a paragraph noting that use of the liquid `| strip_html` flag is possible and useful for meta tag purposes. --- site/docs/posts.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site/docs/posts.md b/site/docs/posts.md index f93eb6b5..3c6ca7fe 100644 --- a/site/docs/posts.md +++ b/site/docs/posts.md @@ -155,6 +155,8 @@ If you don't like the automatically-generated post excerpt, it can be overridden `excerpt` to your post's YAML front-matter. Completely disable it by setting your `excerpt_separator` to `""`. +Also, as with any output generated by Liquid tags, you can pass the `| strip_html` flag to remove any html tags in the output. This is particularly helpful if you wish to output a post excerpt as a `meta="description"` tag within the post `head`. + ## Highlighting code snippets Jekyll also has built-in support for syntax highlighting of code snippets using From ded6350c808c143f3e7053ed74637b90107dd7e4 Mon Sep 17 00:00:00 2001 From: Joel Glovier Date: Thu, 16 Jan 2014 13:24:54 -0500 Subject: [PATCH 29/70] small tweak to clarify last sentence --- site/docs/posts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/docs/posts.md b/site/docs/posts.md index 3c6ca7fe..a8f918f8 100644 --- a/site/docs/posts.md +++ b/site/docs/posts.md @@ -155,7 +155,7 @@ If you don't like the automatically-generated post excerpt, it can be overridden `excerpt` to your post's YAML front-matter. Completely disable it by setting your `excerpt_separator` to `""`. -Also, as with any output generated by Liquid tags, you can pass the `| strip_html` flag to remove any html tags in the output. This is particularly helpful if you wish to output a post excerpt as a `meta="description"` tag within the post `head`. +Also, as with any output generated by Liquid tags, you can pass the `| strip_html` flag to remove any html tags in the output. This is particularly helpful if you wish to output a post excerpt as a `meta="description"` tag within the post `head`, or anywhere else having html tags along with the content is not desirable. ## Highlighting code snippets From e42c1aa02b38ba8e5e51d86bdd0acb2f8f7a416f Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Sat, 18 Jan 2014 14:47:05 -0500 Subject: [PATCH 30/70] rework vision with @redhotvengeance suggestions --- README.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 813e30bd..2e5af42e 100644 --- a/README.markdown +++ b/README.markdown @@ -9,11 +9,11 @@ By Tom Preston-Werner, Nick Quaranto, and many [awesome contributors](https://github.com/jekyll/jekyll/graphs/contributors)! -Jekyll is a simple, blog aware, static site generator perfect for personal or project sites. Think of it sort of like a file-based CMS, except without all the complexity. Jekyll takes your content, runs it through Markdown converters and Liquid templates, and spits out a complete, static website suitable for serving with Apache, Nginx or your favorite web server. This is also the engine behind [GitHub Pages](http://pages.github.com), which you can use to host your project's page or blog right on GitHub. +Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, sans all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served with Apache, Nginx or your favorite web server. Jekyll is the engine behind [GitHub Pages](http://pages.github.com), which you can use to host sites right from your GitHub repositories. ## Philosophy -Jekyll does what you tell it to do, no more, no less. It doesn't try to outsmart users by making bold assumptions or burden them with needless complexity and configuration. Put simply, Jekyll gets out of your way and allows you to concentrate on what truly matters: your content. +Jekyll does what you tell it to do — no more, no less. It doesn't try to outsmart users by making bold assumptions, nor does it burden them with needless complexity and configuration. Put simply, Jekyll gets out of your way and allows you to concentrate on what truly matters: your content. ## Getting Started From 22e1e5f28ca5e5ab0130a4e62bdecff8960803a9 Mon Sep 17 00:00:00 2001 From: liufengyun Date: Sun, 12 Jan 2014 17:40:14 +0800 Subject: [PATCH 31/70] make sure pages with published being false are not generated --- lib/jekyll/convertible.rb | 5 +++++ lib/jekyll/post.rb | 12 +----------- lib/jekyll/site.rb | 5 +++-- test/source/unpublished.html | 7 +++++++ test/test_generated_site.rb | 4 ++++ test/test_page.rb | 5 +++++ test/test_post.rb | 4 ++-- 7 files changed, 27 insertions(+), 15 deletions(-) create mode 100644 test/source/unpublished.html diff --git a/lib/jekyll/convertible.rb b/lib/jekyll/convertible.rb index f838d29b..ea0bcbbf 100644 --- a/lib/jekyll/convertible.rb +++ b/lib/jekyll/convertible.rb @@ -21,6 +21,11 @@ module Jekyll self.content || '' end + # Whether the file is published or not, as indicated in YAML front-matter + def published? + !(self.data.has_key?('published') && self.data['published'] == false) + end + # Returns merged option hash for File.read of self.site (if exists) # and a given param def merged_file_read_opts(opts) diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index 23e131ee..49214615 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -35,7 +35,7 @@ module Jekyll attr_accessor :site attr_accessor :data, :extracted_excerpt, :content, :output, :ext - attr_accessor :date, :slug, :published, :tags, :categories + attr_accessor :date, :slug, :tags, :categories attr_reader :name @@ -60,20 +60,10 @@ module Jekyll self.date = Time.parse(self.data["date"].to_s) end - self.published = self.published? - self.populate_categories self.populate_tags end - def published? - if self.data.has_key?('published') && self.data['published'] == false - false - else - true - end - end - def populate_categories if self.categories.empty? self.categories = self.data.pluralized_array('category', 'categories').map {|c| c.to_s.downcase} diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index c3d68507..d201f025 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -170,7 +170,8 @@ module Jekyll f_rel = File.join(dir, f) read_directories(f_rel) unless self.dest.sub(/\/$/, '') == f_abs elsif has_yaml_header?(f_abs) - pages << Page.new(self, self.source, dir, f) + page = Page.new(self, self.source, dir, f) + pages << page if page.published? else static_files << StaticFile.new(self, self.source, dir, f) end @@ -189,7 +190,7 @@ module Jekyll posts = read_content(dir, '_posts', Post) posts.each do |post| - if post.published && (self.future || post.date <= self.time) + if post.published? && (self.future || post.date <= self.time) aggregate_post_info(post) end end diff --git a/test/source/unpublished.html b/test/source/unpublished.html new file mode 100644 index 00000000..265b6062 --- /dev/null +++ b/test/source/unpublished.html @@ -0,0 +1,7 @@ +--- +layout: default +title: Not published! +published: false +--- + +This should *not* be published! diff --git a/test/test_generated_site.rb b/test/test_generated_site.rb index 2afbb1a7..a27477a2 100644 --- a/test/test_generated_site.rb +++ b/test/test_generated_site.rb @@ -32,6 +32,10 @@ class TestGeneratedSite < Test::Unit::TestCase assert_equal "published.html", published.first end + should "hide unpublished page" do + assert !File.exists?(dest_dir('/unpublished.html')) + end + should "not copy _posts directory" do assert !File.exist?(dest_dir('_posts')) end diff --git a/test/test_page.rb b/test/test_page.rb index 1147a63d..ef2f175b 100644 --- a/test/test_page.rb +++ b/test/test_page.rb @@ -25,6 +25,11 @@ class TestPage < Test::Unit::TestCase assert_equal "/contacts.html", @page.url end + should "not published when published yaml is false" do + @page = setup_page("unpublished.html") + assert_equal false, @page.published? + end + context "in a directory hierarchy" do should "create url based on filename" do @page = setup_page('/contacts', 'bar.html') diff --git a/test/test_post.rb b/test/test_post.rb index 418e60d7..c159afe8 100644 --- a/test/test_post.rb +++ b/test/test_post.rb @@ -387,12 +387,12 @@ class TestPost < Test::Unit::TestCase context "initializing posts" do should "publish when published yaml is no specified" do post = setup_post("2008-02-02-published.textile") - assert_equal true, post.published + assert_equal true, post.published? end should "not published when published yaml is false" do post = setup_post("2008-02-02-not-published.textile") - assert_equal false, post.published + assert_equal false, post.published? end should "recognize date in yaml" do From 90fe9ec055ff1e57103b1cb2fd0c252a7cc47606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Gro=C3=9F?= Date: Sun, 19 Jan 2014 13:49:52 +0100 Subject: [PATCH 32/70] Add missing next and previous docs --- site/docs/variables.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/site/docs/variables.md b/site/docs/variables.md index 89e11a52..96578311 100644 --- a/site/docs/variables.md +++ b/site/docs/variables.md @@ -244,6 +244,24 @@ following is a reference of the available data.

+ +

page.next

+

+ + The next post relative to the position of the current post in + site.posts. Returns nil for the last entry. + +

+ + +

page.previous

+

+ + The previous post relative to the position of the current post in + site.posts. Returns nil for the first entry. + +

+ From f05da3db03c50d8b5b357d3fa3e9452f5654fb61 Mon Sep 17 00:00:00 2001 From: 4ensicLog Date: Sun, 19 Jan 2014 19:51:51 -0600 Subject: [PATCH 33/70] Update structure.md This is my first attempted edit, so forgive any mistakes in decorum or process. I tried to make improvements on word choice which I think will be much clearer to people who are new to Jekyll and how the post filenames work. --- site/docs/structure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/docs/structure.md b/site/docs/structure.md index d03baee0..c178a65f 100644 --- a/site/docs/structure.md +++ b/site/docs/structure.md @@ -113,7 +113,7 @@ An overview of what each of these does:

- Your dynamic content, so to speak. The format of these files is + Your dynamic content, so to speak. The naming convention of these files is important, and must follow the format: YEAR-MONTH-DAY-title.MARKUP. The permalinks can be customized for each From a859c4509a808f4be0958b8482dfd0fb8cda1132 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Sun, 19 Jan 2014 22:06:00 -0600 Subject: [PATCH 34/70] Update history to reflect merge of #1971 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index a2a116c6..3237b0d6 100644 --- a/History.markdown +++ b/History.markdown @@ -79,6 +79,7 @@ * Update `docs/sites.md` link to GitHub Training materials (#1949) * Update `master` with the release info from 1.4.3 (#1947) * Define docs nav in datafile (#1953) + * Clarify the docs around the naming convention for posts (#1971) ## 1.4.3 / 2014-01-13 From d37ea10cf8e61054bcd03c137497fb8ccd044706 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 19 Jan 2014 23:18:59 -0500 Subject: [PATCH 35/70] Update history to reflect merge of #1970 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 3237b0d6..81f2f1c5 100644 --- a/History.markdown +++ b/History.markdown @@ -80,6 +80,7 @@ * Update `master` with the release info from 1.4.3 (#1947) * Define docs nav in datafile (#1953) * Clarify the docs around the naming convention for posts (#1971) + * Add missing `next` and `previous` docs for post layouts and templates (#1970) ## 1.4.3 / 2014-01-13 From e2258403ee261c1593abc5eef138933f27818a9f Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Mon, 20 Jan 2014 21:42:12 -0500 Subject: [PATCH 36/70] language tweaks --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 2e5af42e..228881db 100644 --- a/README.markdown +++ b/README.markdown @@ -9,7 +9,7 @@ By Tom Preston-Werner, Nick Quaranto, and many [awesome contributors](https://github.com/jekyll/jekyll/graphs/contributors)! -Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, sans all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served with Apache, Nginx or your favorite web server. Jekyll is the engine behind [GitHub Pages](http://pages.github.com), which you can use to host sites right from your GitHub repositories. +Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](http://pages.github.com), which you can use to host sites right from your GitHub repositories. ## Philosophy From 9210d4ebd8e0fc79eb6f18a9e4cbc6c785eb03a7 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Tue, 21 Jan 2014 07:50:12 -0600 Subject: [PATCH 37/70] Update history to reflect merge of #1935 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 81f2f1c5..8056c82b 100644 --- a/History.markdown +++ b/History.markdown @@ -53,6 +53,7 @@ * Rename `read_things` to `read_content` (#1928) * Add `script/branding` script for ASCII art lovin' (#1936) * Update the README to reflect the repo move (#1943) + * Add the project vision to the README (#1935) ### Site Enhancements * Document Kramdown's GFM parser option (#1791) From f2fadd656238658db174d8442251efa32b8b3191 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 21 Jan 2014 23:05:46 -0500 Subject: [PATCH 38/70] Update history to reflect merge of #1962 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 8056c82b..5477417f 100644 --- a/History.markdown +++ b/History.markdown @@ -82,6 +82,7 @@ * Define docs nav in datafile (#1953) * Clarify the docs around the naming convention for posts (#1971) * Add missing `next` and `previous` docs for post layouts and templates (#1970) + * Add note to `Writing posts` page about how to strip html from excerpt (#1962) ## 1.4.3 / 2014-01-13 From 30d8743853d4ee0d7db047929f3e812a76d8fb9a Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 21 Jan 2014 23:07:28 -0500 Subject: [PATCH 39/70] Update history to reflect merge of #1951 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 5477417f..fe27a924 100644 --- a/History.markdown +++ b/History.markdown @@ -39,6 +39,7 @@ other subcommands (#1877) * Fix typos (#1910) * Lock Maruku at 0.7.0 to prevent bugs caused by Maruku 0.7.1 (#1958) + * Fixes full path leak to source directory when using include tag (#1951) ### Development Fixes * Add a link to the site in the README.md file (#1795) From 8114ae65526a3c272f71ff7f94f1fa5359ebb222 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Wed, 22 Jan 2014 07:38:04 -0600 Subject: [PATCH 40/70] Update history to reflect merge of #1931 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index fe27a924..adfc825a 100644 --- a/History.markdown +++ b/History.markdown @@ -40,6 +40,7 @@ * Fix typos (#1910) * Lock Maruku at 0.7.0 to prevent bugs caused by Maruku 0.7.1 (#1958) * Fixes full path leak to source directory when using include tag (#1951) + * Don't generate pages that aren't being published (#1931) ### Development Fixes * Add a link to the site in the README.md file (#1795) From 4f0b1bdf6d71f1aa80eaa0cb0bed0094c795ac34 Mon Sep 17 00:00:00 2001 From: Dan Tao Date: Thu, 23 Jan 2014 17:25:17 -0800 Subject: [PATCH 41/70] switched from YAML.safe_load* to SafeYAML.load* --- lib/jekyll.rb | 2 +- lib/jekyll/configuration.rb | 2 +- lib/jekyll/convertible.rb | 2 +- lib/jekyll/site.rb | 2 +- test/test_configuration.rb | 22 +++++++++++----------- test/test_site.rb | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/jekyll.rb b/lib/jekyll.rb index 4b45e2ba..6a85cf08 100644 --- a/lib/jekyll.rb +++ b/lib/jekyll.rb @@ -18,7 +18,7 @@ require 'rubygems' # stdlib require 'fileutils' require 'time' -require 'safe_yaml' +require 'safe_yaml/load' require 'English' require 'pathname' diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index f5e10fe0..afa43d30 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -105,7 +105,7 @@ module Jekyll when '.toml' TOML.load_file(filename) when /\.y(a)?ml/ - YAML.safe_load_file(filename) + SafeYAML.load_file(filename) else raise ArgumentError, "No parser for '#{filename}' is available. Use a .toml or .y(a)ml file instead." end diff --git a/lib/jekyll/convertible.rb b/lib/jekyll/convertible.rb index ea0bcbbf..941312f3 100644 --- a/lib/jekyll/convertible.rb +++ b/lib/jekyll/convertible.rb @@ -45,7 +45,7 @@ module Jekyll merged_file_read_opts(opts)) if self.content =~ /\A(---\s*\n.*?\n?)^(---\s*$\n?)/m self.content = $POSTMATCH - self.data = YAML.safe_load($1) + self.data = SafeYAML.load($1) end rescue SyntaxError => e puts "YAML Exception reading #{File.join(base, name)}: #{e.message}" diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index d201f025..7457ca6d 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -233,7 +233,7 @@ module Jekyll next if File.symlink?(path) && self.safe key = sanitize_filename(File.basename(entry, '.*')) - self.data[key] = YAML.safe_load_file(path) + self.data[key] = SafeYAML.load_file(path) end end diff --git a/test/test_configuration.rb b/test/test_configuration.rb index 36e6cb1d..d8fec5a5 100644 --- a/test/test_configuration.rb +++ b/test/test_configuration.rb @@ -106,26 +106,26 @@ class TestConfiguration < Test::Unit::TestCase end should "fire warning with no _config.yml" do - mock(YAML).safe_load_file(@path) { raise SystemCallError, "No such file or directory - #{@path}" } + mock(SafeYAML).load_file(@path) { raise SystemCallError, "No such file or directory - #{@path}" } mock($stderr).puts("Configuration file: none".yellow) assert_equal Jekyll::Configuration::DEFAULTS, Jekyll.configuration({}) end should "load configuration as hash" do - mock(YAML).safe_load_file(@path) { Hash.new } + mock(SafeYAML).load_file(@path) { Hash.new } mock($stdout).puts("Configuration file: #{@path}") assert_equal Jekyll::Configuration::DEFAULTS, Jekyll.configuration({}) end should "fire warning with bad config" do - mock(YAML).safe_load_file(@path) { Array.new } + mock(SafeYAML).load_file(@path) { Array.new } mock($stderr).puts(("WARNING: ".rjust(20) + "Error reading configuration. Using defaults (and options).").yellow) mock($stderr).puts("Configuration file: (INVALID) #{@path}".yellow) assert_equal Jekyll::Configuration::DEFAULTS, Jekyll.configuration({}) end should "fire warning when user-specified config file isn't there" do - mock(YAML).safe_load_file(@user_config) { raise SystemCallError, "No such file or directory - #{@user_config}" } + mock(SafeYAML).load_file(@user_config) { raise SystemCallError, "No such file or directory - #{@user_config}" } mock($stderr).puts(("Fatal: ".rjust(20) + "The configuration file '#{@user_config}' could not be found.").red) assert_raises LoadError do Jekyll.configuration({'config' => [@user_config]}) @@ -143,19 +143,19 @@ class TestConfiguration < Test::Unit::TestCase end should "load default config if no config_file is set" do - mock(YAML).safe_load_file(@paths[:default]) { Hash.new } + mock(SafeYAML).load_file(@paths[:default]) { Hash.new } mock($stdout).puts("Configuration file: #{@paths[:default]}") assert_equal Jekyll::Configuration::DEFAULTS, Jekyll.configuration({}) end should "load different config if specified" do - mock(YAML).safe_load_file(@paths[:other]) { {"baseurl" => "http://wahoo.dev"} } + mock(SafeYAML).load_file(@paths[:other]) { {"baseurl" => "http://wahoo.dev"} } mock($stdout).puts("Configuration file: #{@paths[:other]}") assert_equal Jekyll::Configuration::DEFAULTS.deep_merge({ "baseurl" => "http://wahoo.dev" }), Jekyll.configuration({ "config" => @paths[:other] }) end should "load default config if path passed is empty" do - mock(YAML).safe_load_file(@paths[:default]) { Hash.new } + mock(SafeYAML).load_file(@paths[:default]) { Hash.new } mock($stdout).puts("Configuration file: #{@paths[:default]}") assert_equal Jekyll::Configuration::DEFAULTS, Jekyll.configuration({ "config" => @paths[:empty] }) end @@ -167,8 +167,8 @@ class TestConfiguration < Test::Unit::TestCase end should "load multiple config files" do - mock(YAML).safe_load_file(@paths[:default]) { Hash.new } - mock(YAML).safe_load_file(@paths[:other]) { Hash.new } + mock(SafeYAML).load_file(@paths[:default]) { Hash.new } + mock(SafeYAML).load_file(@paths[:other]) { Hash.new } mock(TOML).load_file(@paths[:toml]) { Hash.new } mock($stdout).puts("Configuration file: #{@paths[:default]}") mock($stdout).puts("Configuration file: #{@paths[:other]}") @@ -177,8 +177,8 @@ class TestConfiguration < Test::Unit::TestCase end should "load multiple config files and last config should win" do - mock(YAML).safe_load_file(@paths[:default]) { {"baseurl" => "http://example.dev"} } - mock(YAML).safe_load_file(@paths[:other]) { {"baseurl" => "http://wahoo.dev"} } + mock(SafeYAML).load_file(@paths[:default]) { {"baseurl" => "http://example.dev"} } + mock(SafeYAML).load_file(@paths[:other]) { {"baseurl" => "http://wahoo.dev"} } mock($stdout).puts("Configuration file: #{@paths[:default]}") mock($stdout).puts("Configuration file: #{@paths[:other]}") assert_equal Jekyll::Configuration::DEFAULTS.deep_merge({ "baseurl" => "http://wahoo.dev" }), Jekyll.configuration({ "config" => [@paths[:default], @paths[:other]] }) diff --git a/test/test_site.rb b/test/test_site.rb index 2d45ea7c..ba5622f9 100644 --- a/test/test_site.rb +++ b/test/test_site.rb @@ -330,7 +330,7 @@ class TestSite < Test::Unit::TestCase site = Site.new(Jekyll.configuration) site.process - file_content = YAML.safe_load_file(File.join(source_dir, '_data', 'members.yaml')) + file_content = SafeYAML.load_file(File.join(source_dir, '_data', 'members.yaml')) assert_equal site.data['members'], file_content assert_equal site.site_payload['site']['data']['members'], file_content @@ -340,7 +340,7 @@ class TestSite < Test::Unit::TestCase site = Site.new(Jekyll.configuration) site.process - file_content = YAML.safe_load_file(File.join(source_dir, '_data', 'languages.yml')) + file_content = SafeYAML.load_file(File.join(source_dir, '_data', 'languages.yml')) assert_equal site.data['languages'], file_content assert_equal site.site_payload['site']['data']['languages'], file_content @@ -350,7 +350,7 @@ class TestSite < Test::Unit::TestCase site = Site.new(Jekyll.configuration.merge({'safe' => false})) site.process - file_content = YAML.safe_load_file(File.join(source_dir, '_data', 'products.yml')) + file_content = SafeYAML.load_file(File.join(source_dir, '_data', 'products.yml')) assert_equal site.data['products'], file_content assert_equal site.site_payload['site']['data']['products'], file_content From fafacef0a070ec4831f3f537f0069dfcbd798ba2 Mon Sep 17 00:00:00 2001 From: Dan Tao Date: Thu, 23 Jan 2014 17:42:14 -0800 Subject: [PATCH 42/70] added a test that YAML.load doesn't get clobbered I THINK this is a good idea? I considered multiple approaches to testing this; what I like about this dumb way (just try to deserialize a symbol) is that it's nice and simple. --- test/test_configuration.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test_configuration.rb b/test/test_configuration.rb index d8fec5a5..a96141fa 100644 --- a/test/test_configuration.rb +++ b/test/test_configuration.rb @@ -131,6 +131,11 @@ class TestConfiguration < Test::Unit::TestCase Jekyll.configuration({'config' => [@user_config]}) end end + + should "not clobber YAML.load to the dismay of other libraries" do + assert_equal :foo, YAML.load(':foo') + # as opposed to: assert_equal ':foo', SafeYAML.load(':foo') + end end context "loading config from external file" do setup do From c9a3c40f8392638fddb6f4b68875dea0ad89d163 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 24 Jan 2014 12:19:19 -0500 Subject: [PATCH 43/70] fixes based on @mattr-'s notes --- lib/jekyll/converters/sass.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/jekyll/converters/sass.rb b/lib/jekyll/converters/sass.rb index 0401ffb3..0c36eb65 100644 --- a/lib/jekyll/converters/sass.rb +++ b/lib/jekyll/converters/sass.rb @@ -11,12 +11,12 @@ module Jekyll ".css" end - def user_sass_configs + def jekyll_sass_configuration @config["sass"] || {} end def sass_build_configuration_options(overrides) - user_sass_configs.deep_merge(overrides).symbolize_keys + jekyll_sass_configuration.deep_merge(overrides).symbolize_keys end def syntax_type_of_content(content) @@ -28,13 +28,14 @@ module Jekyll end def sass_dir - user_sass_configs["sass_dir"] || "_sass" + return "_sass" if jekyll_sass_configuration["sass_dir"].to_s.empty? + jekyll_sass_configuration["sass_dir"] end def sass_dir_relative_to_site_source File.join( @config["source"], - File.expand_path(sass_dir, "/") + File.expand_path(sass_dir, "/") # FIXME: Not windows-compatible ) end From b2c45aafdc445ec96dcb3d8f23eede2cafc0974e Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Fri, 24 Jan 2014 17:17:52 -0600 Subject: [PATCH 44/70] Update history to reflect merge of #1932 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index adfc825a..3ed3a5ca 100644 --- a/History.markdown +++ b/History.markdown @@ -8,6 +8,7 @@ * Move to jekyll/jekyll from mojombo/jekyll (#1817) * Allow custom markdown processors (#1872) * Provide support for the Rouge syntax highlighter (#1859) + * Provide support for Sass (#1932) ### Minor Enhancements * Move the EntryFilter class into the Jekyll module to avoid polluting the From 4a769dbf5f683924a8ee3915701d7b96a4086007 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 24 Jan 2014 17:17:41 -0800 Subject: [PATCH 45/70] Optimize Post#{next,previous} Use object equality for comparisons rather than Comparable#==, which in turn uses Post#<=>, which is slow. This yielded a 3x performance improvement for `jekyll build` on a large site (1m6.467s -> 0m19.532s). --- lib/jekyll/post.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index 49214615..edc5caae 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -271,8 +271,7 @@ module Jekyll end def next - pos = self.site.posts.index(self) - + pos = self.site.posts.index {|post| post.equal?(self) } if pos && pos < self.site.posts.length-1 self.site.posts[pos+1] else @@ -281,7 +280,7 @@ module Jekyll end def previous - pos = self.site.posts.index(self) + pos = self.site.posts.index {|post| post.equal?(self) } if pos && pos > 0 self.site.posts[pos-1] else From 2e1ab7e6feac347293f39f016944d9795dfe2967 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Fri, 24 Jan 2014 21:10:45 -0600 Subject: [PATCH 46/70] Update history to reflect merge of #1983 --- History.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.markdown b/History.markdown index 3ed3a5ca..16292429 100644 --- a/History.markdown +++ b/History.markdown @@ -9,6 +9,8 @@ * Allow custom markdown processors (#1872) * Provide support for the Rouge syntax highlighter (#1859) * Provide support for Sass (#1932) + * Provide a 300% improvement when generating sites that use + `Post#next` or `Post#previous` (#1983) ### Minor Enhancements * Move the EntryFilter class into the Jekyll module to avoid polluting the From d2e22eda28b153a6b06f7d53049f24427d811b6f Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 24 Jan 2014 22:23:55 -0500 Subject: [PATCH 47/70] Add some rebund :heart: to speed up TravisCI builds. --- .travis.yml | 27 ++++++---- script/rebund | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 157 insertions(+), 10 deletions(-) create mode 100755 script/rebund diff --git a/.travis.yml b/.travis.yml index 17ded23a..bc70f050 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,30 @@ language: ruby cache: bundler before_install: - - gem install bundler +- gem install bundler +install: +- script/rebund download +- bundle install --path vendor/bundle rvm: - - 2.1.0 - - 2.0.0 - - 1.9.3 - - 1.9.2 -script: bundle exec rake +- 2.1.0 +- 2.0.0 +- 1.9.3 +- 1.9.2 +script: script/cibuild +after_script: +- script/rebund upload notifications: irc: on_success: change on_failure: change channels: - - "irc.freenode.org#jekyll" - #on_success: change - #on_failure: change + - irc.freenode.org#jekyll template: - - "%{repository}#%{build_number} (%{branch}) %{message} %{build_url}" + - '%{repository}#%{build_number} (%{branch}) %{message} %{build_url}' email: on_success: never on_failure: never +env: + global: + - secure: DQ8RKNaeErucKnmOWKxWHQ76GBr50wNf2ywz/kQtriXpvXEhD3zVJus0jC34ykCK4CqW2WBha8nO4NtmPJRVII5qHyJB2+pxheMK++UZ2+mJ+8CVbqtcjpMZMkfRJj0C9rktG7Onk9QANZGIBf79HPnhZXjKqX9XFwI1tbyl3kw= + - secure: gG7GIWmdzbAv/qt9RyE96M/BNGMWhrVkQIL5cKZ0N4rwuAZzfqays9EE+jF9Nu1IwG6bfTUu7C75vzQnJkL8zBq5ddsQCJ+DIhh4o4QqsTwh4/0uiRMG87EBa2ASKn4afx181fXOUoGZtcbMqfEW0Eaidl4Z+8qEx4KxVghRlx8= diff --git a/script/rebund b/script/rebund new file mode 100755 index 00000000..7aa2db2c --- /dev/null +++ b/script/rebund @@ -0,0 +1,140 @@ +#!/bin/bash +# +# rebund(1) +# +# Author: Julien Letessier +# Homepage: https://github.com/mezis/rebund +# License: +# +# Copyright (c) 2014 HouseTrip Ltd +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +# Configuration +: ${REBUND_CREDENTIALS:=user:secret} +: ${REBUND_ENDPOINT=http://keyfile-production.herokuapp.com} +: ${REBUND_TARBALL:=bundle.tbz} +: ${REBUND_BUNDLE_DIR:=vendor/bundle} + + + +log() { + echo "rebund: $*" > /dev/stderr +} + +die() { + echo "fatal: $*" > /dev/stderr + exit 1 +} + +success() { + log "$*" + exit 0 +} + +on_error() { + die 'unknown error.' +} + +get_ruby_version() { + bundle exec ruby --version +} + +get_gemfile() { + bundle exec sh -c 'echo $BUNDLE_GEMFILE' +} + +calculate_hash() { + (get_ruby_version ; cat $(get_gemfile)) | openssl sha256 | sed -e 's/.* //' +} + +build_tarball() { + test -e $REBUND_BUNDLE_DIR || die "cannot find bundle directory in ${REBUND_BUNDLE_DIR}" + test -e $REBUND_TARBALL && success 'bundle already uploaded' + tar jcf $REBUND_TARBALL $REBUND_BUNDLE_DIR +} + +upload_tarball() { + curl --fail \ + -F filedata=@${REBUND_TARBALL} \ + --digest --user $REBUND_CREDENTIALS \ + ${REBUND_ENDPOINT}/$(calculate_hash) \ + || success "could not upload bundle" +} + +expand_tarball() { + test -e $REBUND_TARBALL || success "no tarball" + tar jxf $REBUND_TARBALL +} + +download_tarball() { + curl --fail \ + --location \ + -o ${REBUND_TARBALL} \ + --digest --user $REBUND_CREDENTIALS \ + ${REBUND_ENDPOINT}/$(calculate_hash) \ + || success "could not download bundle" +} + +rebund_upload() { + build_tarball + upload_tarball +} + +rebund_download() { + download_tarball + expand_tarball +} + +rebund_usage() { + success "usage: $0 [-v] [upload|download]" +} + +# cath errors +trap on_error ERR + +# inherit the ERR trap in subprocesses +set -E + +while test $# -gt 0 ; do + case $1 in + -v) + set -x + ;; + upload) + rebund_upload + exit 0 + ;; + download) + rebund_download + exit 0 + ;; + *) + rebund_usage + exit 1 + ;; + esac + shift +done + +rebund_usage From 37b587168fa01ec6db3d5b282053c3ca414e184d Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 24 Jan 2014 22:31:44 -0500 Subject: [PATCH 48/70] Don't need to install bundler, right? --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bc70f050..42664eb3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,5 @@ language: ruby cache: bundler -before_install: -- gem install bundler install: - script/rebund download - bundle install --path vendor/bundle From ecc05e57ae2e23a8b83dc3aa340f4c23f6949c64 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Fri, 24 Jan 2014 21:42:55 -0600 Subject: [PATCH 49/70] Update history to reflect merge of #1985 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 16292429..fe78b7be 100644 --- a/History.markdown +++ b/History.markdown @@ -59,6 +59,7 @@ * Add `script/branding` script for ASCII art lovin' (#1936) * Update the README to reflect the repo move (#1943) * Add the project vision to the README (#1935) + * Speed up Travis CI builds by using Rebund (#1985) ### Site Enhancements * Document Kramdown's GFM parser option (#1791) From 710e0e5a3ce5e7daf2e9b279a250a0a01dd0eee9 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 24 Jan 2014 21:26:34 -0500 Subject: [PATCH 50/70] Hm... I wonder if yarp can speed up our build process. --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 851fabc2..20c99248 100644 --- a/Gemfile +++ b/Gemfile @@ -1,2 +1,2 @@ -source 'https://rubygems.org' +source 'http://us.yarp.io' gemspec From ea397d09460137762e79e45c287933cc11c7836d Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Fri, 24 Jan 2014 21:45:18 -0600 Subject: [PATCH 51/70] Update history to reflect merge of #1984 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index fe78b7be..aa6bcfc3 100644 --- a/History.markdown +++ b/History.markdown @@ -60,6 +60,7 @@ * Update the README to reflect the repo move (#1943) * Add the project vision to the README (#1935) * Speed up Travis CI builds by using Rebund (#1985) + * Use Yarp as a Gem proxy for Travis CI (#1984) ### Site Enhancements * Document Kramdown's GFM parser option (#1791) From fdbfd719cabb7cae126801742237209d2343faaa Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 25 Jan 2014 16:53:47 -0500 Subject: [PATCH 52/70] Add CoffeeScript converter. --- .travis.yml | 4 +-- Gemfile | 1 + jekyll.gemspec | 1 + lib/jekyll.rb | 3 ++ test/source/js/coffeescript.coffee | 10 ++++++ test/test_coffeescript.rb | 49 ++++++++++++++++++++++++++++++ test/test_filters.rb | 2 +- test/test_site.rb | 2 +- 8 files changed, 68 insertions(+), 4 deletions(-) create mode 100644 test/source/js/coffeescript.coffee create mode 100644 test/test_coffeescript.rb diff --git a/.travis.yml b/.travis.yml index 42664eb3..e193e371 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,5 +24,5 @@ notifications: on_failure: never env: global: - - secure: DQ8RKNaeErucKnmOWKxWHQ76GBr50wNf2ywz/kQtriXpvXEhD3zVJus0jC34ykCK4CqW2WBha8nO4NtmPJRVII5qHyJB2+pxheMK++UZ2+mJ+8CVbqtcjpMZMkfRJj0C9rktG7Onk9QANZGIBf79HPnhZXjKqX9XFwI1tbyl3kw= - - secure: gG7GIWmdzbAv/qt9RyE96M/BNGMWhrVkQIL5cKZ0N4rwuAZzfqays9EE+jF9Nu1IwG6bfTUu7C75vzQnJkL8zBq5ddsQCJ+DIhh4o4QqsTwh4/0uiRMG87EBa2ASKn4afx181fXOUoGZtcbMqfEW0Eaidl4Z+8qEx4KxVghRlx8= + - secure: YFgVNymO2MvA7ieB3hJKQ9cF8zhi5uc3NnBx+ngs6+XF7lV7zYZGMYJ9ufEuPRkXFEI1sSNQJjOQwjmqC71xABrWw6B69XDdYgoTX+53GryVfsrDIPksQo89WAAMKqoPznWtj5fA3OTxUWjHVye2JsduPNuihpniI5j79IzDFQY= + - secure: YrDB4baCV00FPyRafR9UTAUsSgK/07Re+7T+blgX2gK/j54DJdof+EYbQPjc3HeWdfQgIzal2+KkwBItEu2lA8/j6qPwUngd9oRWJPLm19xFizECRY9SD1BxU53T3qmnoYqG0jFvKgYfnn9ggHRDEL31YDOA1monhFhq/8S3SdA= diff --git a/Gemfile b/Gemfile index 20c99248..c59f0b36 100644 --- a/Gemfile +++ b/Gemfile @@ -1,2 +1,3 @@ source 'http://us.yarp.io' +source 'https://rubygems.org' gemspec diff --git a/jekyll.gemspec b/jekyll.gemspec index f5011ba9..85b697e9 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -35,6 +35,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency('redcarpet', "~> 3.0") s.add_runtime_dependency('toml', '~> 0.1.0') s.add_runtime_dependency('sass', '~> 3.2') + s.add_runtime_dependency('jekyll-coffeescript', '~> 1.0') s.add_development_dependency('rake', "~> 10.1") s.add_development_dependency('rdoc', "~> 3.11") diff --git a/lib/jekyll.rb b/lib/jekyll.rb index 02509040..bf286f1e 100644 --- a/lib/jekyll.rb +++ b/lib/jekyll.rb @@ -61,6 +61,9 @@ require_all 'jekyll/converters/markdown' require_all 'jekyll/generators' require_all 'jekyll/tags' +# plugins +require 'jekyll-coffeescript' + SafeYAML::OPTIONS[:suppress_warnings] = true module Jekyll diff --git a/test/source/js/coffeescript.coffee b/test/source/js/coffeescript.coffee new file mode 100644 index 00000000..e0e066b1 --- /dev/null +++ b/test/source/js/coffeescript.coffee @@ -0,0 +1,10 @@ +--- +--- + +$ -> + list = [1, 2, 3, 4, 5] + square = (x) -> x * x + cube = (x) -> square(x) * x + cubes = (math.cube num for num in list) + + alert "I knew it!" if elvis? diff --git a/test/test_coffeescript.rb b/test/test_coffeescript.rb new file mode 100644 index 00000000..cd052c05 --- /dev/null +++ b/test/test_coffeescript.rb @@ -0,0 +1,49 @@ +require 'helper' + +class TestCoffeeScript < Test::Unit::TestCase + context "converting CoffeeScript" do + setup do + @site = Jekyll::Site.new(Jekyll.configuration({ + "source" => source_dir, + "destination" => dest_dir + })) + @site.process + @test_coffeescript_file = dest_dir("js/coffeescript.js") + @js_output = <<-JS +(function() { + $(function() { + var cube, cubes, list, num, square; + list = [1, 2, 3, 4, 5]; + square = function(x) { + return x * x; + }; + cube = function(x) { + return square(x) * x; + }; + cubes = (function() { + var _i, _len, _results; + _results = []; + for (_i = 0, _len = list.length; _i < _len; _i++) { + num = list[_i]; + _results.push(math.cube(num)); + } + return _results; + })(); + if (typeof elvis !== \"undefined\" && elvis !== null) { + return alert(\"I knew it!\"); + } + }); + +}).call(this); +JS + end + + should "write a JS file in place" do + assert File.exists?(@test_coffeescript_file), "Can't find the converted CoffeeScript file in the dest_dir." + end + + should "produce JS" do + assert_equal @js_output, File.read(@test_coffeescript_file) + end + end +end diff --git a/test/test_filters.rb b/test/test_filters.rb index 0d1da02f..4b5c8212 100644 --- a/test/test_filters.rb +++ b/test/test_filters.rb @@ -131,7 +131,7 @@ class TestFilters < Test::Unit::TestCase assert_equal 2, g["items"].size when "" assert g["items"].is_a?(Array), "The list of grouped items for '' is not an Array." - assert_equal 5, g["items"].size + assert_equal 6, g["items"].size end end end diff --git a/test/test_site.rb b/test/test_site.rb index 2d45ea7c..45921a7e 100644 --- a/test/test_site.rb +++ b/test/test_site.rb @@ -157,7 +157,7 @@ class TestSite < Test::Unit::TestCase should "sort pages alphabetically" do stub.proxy(Dir).entries { |entries| entries.reverse } @site.process - sorted_pages = %w(.htaccess about.html bar.html contacts.html deal.with.dots.html foo.md index.html index.html properties.html sitemap.xml symlinked-file) + sorted_pages = %w(.htaccess about.html bar.html coffeescript.coffee contacts.html deal.with.dots.html foo.md index.html index.html properties.html sitemap.xml symlinked-file) assert_equal sorted_pages, @site.pages.map(&:name) end From 509e2181de58f63310fa55e84274977b960c53cf Mon Sep 17 00:00:00 2001 From: Aziz Shamim Date: Sun, 26 Jan 2014 12:15:15 -0600 Subject: [PATCH 53/70] sync mime types to GitHub --- lib/jekyll/mime.types | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/lib/jekyll/mime.types b/lib/jekyll/mime.types index b926a009..ee7aa44c 100644 --- a/lib/jekyll/mime.types +++ b/lib/jekyll/mime.types @@ -1,12 +1,13 @@ -# These are the same MIME types that GitHub Pages uses as of 17 Mar 2013. +-# These are the same MIME types that GitHub Pages uses as of 26 January 2014 text/html html htm shtml text/css css -text/xml xml rss xsl +text/xml xml rss xsl xsd image/gif gif image/jpeg jpeg jpg application/x-javascript js application/atom+xml atom +application/json json geojson topojson text/mathml mml text/plain txt @@ -17,16 +18,22 @@ text/cache-manifest manifest appcache text/coffeescript coffee text/plain pde text/plain md markdown +text/vcard vcf vcard image/png png image/svg+xml svg +image/svg+xml svgz image/tiff tif tiff image/vnd.wap.wbmp wbmp image/x-icon ico image/x-jng jng image/x-ms-bmp bmp -application/json json +application/vnd.ms-fontobject eot +application/x-font-ttf ttf +application/x-font-woff woff +font/opentype otf + application/java-archive jar ear application/mac-binhex40 hqx application/msword doc @@ -34,18 +41,19 @@ application/pdf pdf application/postscript ps eps ai application/rdf+xml rdf application/rtf rtf -text/vcard vcf vcard application/vnd.apple.pkpass pkpass application/vnd.ms-excel xls application/vnd.ms-powerpoint ppt application/vnd.wap.wmlc wmlc application/xhtml+xml xhtml -application/x-chrome-extension crx application/x-cocoa cco -application/x-font-ttf ttf +application/x-chrome-extension crx application/x-java-archive-diff jardiff application/x-java-jnlp-file jnlp application/x-makeself run +application/x-ms-application application +application/x-ms-manifest manifest +application/x-ms-vsto vsto application/x-ns-proxy-autoconfig pac application/x-perl pl pm application/x-pilot prc pdb @@ -63,8 +71,8 @@ application/zip zip application/octet-stream bin exe dll application/octet-stream deb +application/octet-stream deploy application/octet-stream dmg -application/octet-stream eot application/octet-stream iso img application/octet-stream msi msp msm @@ -74,12 +82,14 @@ audio/x-realaudio ra audio/ogg ogg video/3gpp 3gpp 3gp +video/m4v m4v +video/mp4 mp4 video/mpeg mpeg mpg +video/ogg ogg ogv video/quicktime mov +video/webm webm video/x-flv flv video/x-mng mng video/x-ms-asf asx asf video/x-ms-wmv wmv video/x-msvideo avi -video/ogg ogv -video/webm webm From c9a732c4f9da15214d9d3b65268f0e7fc47cd01c Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 26 Jan 2014 13:39:31 -0500 Subject: [PATCH 54/70] Update history to reflect merge of #1993 [ci skip] --- History.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.markdown b/History.markdown index aa6bcfc3..bba40c54 100644 --- a/History.markdown +++ b/History.markdown @@ -31,6 +31,8 @@ (#1875) * Route 404 errors to a custom 404 page in development (#1899) * Excludes are now relative to the site source (#1916) + * Bring MIME Types file for `jekyll serve` to complete parity with GH Pages + servers (#1993) ### Bug Fixes * Don't allow nil entries when loading posts (#1796) From 2d6bd741d0d1fb34efd11c55850ee1b2a3806fde Mon Sep 17 00:00:00 2001 From: Ryan Morrissey <23maverick23@gmail.com> Date: Tue, 28 Jan 2014 22:23:34 -0500 Subject: [PATCH 55/70] Adding jekyll-humanize plugin to site documentation. --- site/docs/plugins.md | 1 + 1 file changed, 1 insertion(+) diff --git a/site/docs/plugins.md b/site/docs/plugins.md index 2126ea7f..2b429a44 100644 --- a/site/docs/plugins.md +++ b/site/docs/plugins.md @@ -457,6 +457,7 @@ You can find a few useful plugins at the following locations: - [pluralize](https://github.com/bdesham/pluralize): Easily combine a number and a word into a gramatically-correct amount like “1 minute” or “2 minute**s**”. - [reading_time](https://github.com/bdesham/reading_time): Count words and estimate reading time for a piece of text, ignoring HTML elements that are unlikely to contain running text. - [Table of Content Generator](https://github.com/dafi/jekyll-toc-generator): Generate the HTML code containing a table of content (TOC), the TOC can be customized in many way, for example you can decide which pages can be without TOC. +- [jekyll-humanize](https://github.com/23maverick23/jekyll-humanize): This is a port of the Django app humanize which adds a "human touch" to data. Each method represents a Fluid type filter that can be used in your Jekyll site templates. Given that Jekyll produces static sites, some of the original methods do not make logical sense to port (e.g. naturaltime). #### Tags From a02123bee460ad375b903c64af64c05723b295ad Mon Sep 17 00:00:00 2001 From: Ryan Morrissey <23maverick23@gmail.com> Date: Tue, 28 Jan 2014 22:32:12 -0500 Subject: [PATCH 56/70] Quickly and easily add Font Awesome icons to your posts. --- site/docs/plugins.md | 1 + 1 file changed, 1 insertion(+) diff --git a/site/docs/plugins.md b/site/docs/plugins.md index 2126ea7f..b8f0bab0 100644 --- a/site/docs/plugins.md +++ b/site/docs/plugins.md @@ -496,6 +496,7 @@ You can find a few useful plugins at the following locations: - [Jekyll Date Chart](https://github.com/GSI/jekyll_date_chart) by [GSI](https://github.com/GSI): Block that renders date line charts based on textile-formatted tables. - [Jekyll Image Encode](https://github.com/GSI/jekyll_image_encode) by [GSI](https://github.com/GSI): Tag that renders base64 codes of images fetched from the web. - [Jekyll Quick Man](https://github.com/GSI/jekyll_quick_man) by [GSI](https://github.com/GSI): Tag that renders pretty links to man page sources on the internet. +- [jekyll-font-awesome](https://gist.github.com/23maverick23/8532525): Quickly and easily add Font Awesome icons to your posts. #### Collections From dbd3d15f29258c09d00f8a9d0772a720d6534a0f Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 28 Jan 2014 23:39:12 -0500 Subject: [PATCH 57/70] Update history to reflect merge of #1998 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index bba40c54..0fb6cd15 100644 --- a/History.markdown +++ b/History.markdown @@ -92,6 +92,7 @@ * Clarify the docs around the naming convention for posts (#1971) * Add missing `next` and `previous` docs for post layouts and templates (#1970) * Add note to `Writing posts` page about how to strip html from excerpt (#1962) + * Add `jekyll-humanize` plugin to plugin list (#1998) ## 1.4.3 / 2014-01-13 From 1d014edca2abfa75b11ab66d1d954164936555b4 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 28 Jan 2014 23:40:08 -0500 Subject: [PATCH 58/70] Update history to reflect merge of #1999 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 0fb6cd15..2d2578d4 100644 --- a/History.markdown +++ b/History.markdown @@ -93,6 +93,7 @@ * Add missing `next` and `previous` docs for post layouts and templates (#1970) * Add note to `Writing posts` page about how to strip html from excerpt (#1962) * Add `jekyll-humanize` plugin to plugin list (#1998) + * Add `jekyll-font-awesome` plugin to plugin list (#1999) ## 1.4.3 / 2014-01-13 From 9bd160dd8eb6162681bdaf8fcdda75d5c1a561ee Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 28 Jan 2014 23:40:55 -0500 Subject: [PATCH 59/70] Travis is seriously inbred. --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 20c99248..c59f0b36 100644 --- a/Gemfile +++ b/Gemfile @@ -1,2 +1,3 @@ source 'http://us.yarp.io' +source 'https://rubygems.org' gemspec From 645baf33534787631dbc510567501971952676d1 Mon Sep 17 00:00:00 2001 From: Ryan Morrissey <23maverick23@gmail.com> Date: Wed, 29 Jan 2014 23:09:42 -0500 Subject: [PATCH 60/70] =?UTF-8?q?Added=20new=20=E2=80=9CEditors=E2=80=9D?= =?UTF-8?q?=20section=20to=20`=5Fplugins`=20for=20=E2=80=9Csublime-jekyll?= =?UTF-8?q?=E2=80=9D.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/docs/plugins.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/site/docs/plugins.md b/site/docs/plugins.md index 2126ea7f..91bf4384 100644 --- a/site/docs/plugins.md +++ b/site/docs/plugins.md @@ -525,6 +525,10 @@ You can find a few useful plugins at the following locations: - [grunt-jekyll](https://github.com/dannygarcia/grunt-jekyll): A straightforward [Grunt](http://gruntjs.com/) plugin for Jekyll. - [jekyll-postfiles](https://github.com/indirect/jekyll-postfiles): Add `_postfiles` directory and {% raw %}`{{ postfile }}`{% endraw %} tag so the files a post refers to will always be right there inside your repo. +#### Editors + +- [sublime-jekyll](https://github.com/23maverick23/sublime-jekyll): A Sublime Text package for Jekyll static sites. This package should help creating Jekyll sites and posts easier by providing access to key template tags and filters, as well as common completions and a current date/datetime command (for dating posts). You can install this package manually via GitHub, or via [Package Control](https://sublime.wbond.net/packages/Jekyll). +

Jekyll Plugins Wanted

From 669cc496cd86c445d92bc2419952717e14a286d7 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Thu, 30 Jan 2014 20:39:44 -0600 Subject: [PATCH 61/70] Update history to reflect merge of #1991 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 2d2578d4..4d6f177e 100644 --- a/History.markdown +++ b/History.markdown @@ -11,6 +11,7 @@ * Provide support for Sass (#1932) * Provide a 300% improvement when generating sites that use `Post#next` or `Post#previous` (#1983) + * Provide support for CoffeeScript (#1991) ### Minor Enhancements * Move the EntryFilter class into the Jekyll module to avoid polluting the From 49b7fdb62f499e0ae4eb6925bcb3c3ac4793259e Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 31 Jan 2014 00:22:21 -0500 Subject: [PATCH 62/70] Yarp seems to be eff'd. --- Gemfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Gemfile b/Gemfile index c59f0b36..851fabc2 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,2 @@ -source 'http://us.yarp.io' source 'https://rubygems.org' gemspec From 03ba5d8d181a9d2d6f9e578b6dad04e149e5d212 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 31 Jan 2014 00:24:59 -0500 Subject: [PATCH 63/70] Update history to reflect merge of #2001 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 4d6f177e..8ac6ea04 100644 --- a/History.markdown +++ b/History.markdown @@ -95,6 +95,7 @@ * Add note to `Writing posts` page about how to strip html from excerpt (#1962) * Add `jekyll-humanize` plugin to plugin list (#1998) * Add `jekyll-font-awesome` plugin to plugin list (#1999) + * Add `sublime-jekyll` to list of Editor plugins (#2001) ## 1.4.3 / 2014-01-13 From e940afdf00c67ac8a268540f9ddb54ddf1801631 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 31 Jan 2014 00:27:18 -0500 Subject: [PATCH 64/70] Add vim-jekyll to list of Editor plugins --- site/docs/plugins.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site/docs/plugins.md b/site/docs/plugins.md index bfd4e63c..7370cd88 100644 --- a/site/docs/plugins.md +++ b/site/docs/plugins.md @@ -530,6 +530,8 @@ You can find a few useful plugins at the following locations: #### Editors - [sublime-jekyll](https://github.com/23maverick23/sublime-jekyll): A Sublime Text package for Jekyll static sites. This package should help creating Jekyll sites and posts easier by providing access to key template tags and filters, as well as common completions and a current date/datetime command (for dating posts). You can install this package manually via GitHub, or via [Package Control](https://sublime.wbond.net/packages/Jekyll). +- [vim-jekyll](https://github.com/parkr/vim-jekyll): A vim plugin to generate + new posts and run `jekyll build` all without leaving vim.

Jekyll Plugins Wanted
From 1470a8a997647da1cfdc57eb1effd61ee8f63a2d Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Fri, 31 Jan 2014 08:44:31 -0600 Subject: [PATCH 65/70] Update history to reflect merge of #2004 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 8ac6ea04..ad0b0390 100644 --- a/History.markdown +++ b/History.markdown @@ -64,6 +64,7 @@ * Add the project vision to the README (#1935) * Speed up Travis CI builds by using Rebund (#1985) * Use Yarp as a Gem proxy for Travis CI (#1984) + * Remove Yarp as a Gem proxy for Travis CI (#2004) ### Site Enhancements * Document Kramdown's GFM parser option (#1791) From 37dbc646a1c901bbb101845bd56839aa450f92ea Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Fri, 31 Jan 2014 08:45:14 -0600 Subject: [PATCH 66/70] Update history to reflect merge of #2005 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index ad0b0390..91e82fc5 100644 --- a/History.markdown +++ b/History.markdown @@ -97,6 +97,7 @@ * Add `jekyll-humanize` plugin to plugin list (#1998) * Add `jekyll-font-awesome` plugin to plugin list (#1999) * Add `sublime-jekyll` to list of Editor plugins (#2001) + * Add `vim-jekyll` to the list of Editor plugins (#2005) ## 1.4.3 / 2014-01-13 From 1e6847c43ff73667eaa4c4d1776240cf0597efc9 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Fri, 31 Jan 2014 08:48:16 -0600 Subject: [PATCH 67/70] Update history to reflect merge of #1982 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 91e82fc5..b505f089 100644 --- a/History.markdown +++ b/History.markdown @@ -47,6 +47,7 @@ * Lock Maruku at 0.7.0 to prevent bugs caused by Maruku 0.7.1 (#1958) * Fixes full path leak to source directory when using include tag (#1951) * Don't generate pages that aren't being published (#1931) + * Use `SafeYAML.load` to avoid conflicts with other projects (#1982) ### Development Fixes * Add a link to the site in the README.md file (#1795) From f8d6ff42ff97c85bc7f25c267d0c26abd41c6701 Mon Sep 17 00:00:00 2001 From: Jashank Jeremy Date: Tue, 4 Feb 2014 12:45:14 +1100 Subject: [PATCH 68/70] Update Jekyll gemspec. The master gemspec has gotten a tad out of date; this updates the manifest, notably, but also the version number, to bring it in line with v1-stable. I'm not sure this is precisely the right way for the latter to work; @parkr, would you like to comment on this? --- jekyll.gemspec | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/jekyll.gemspec b/jekyll.gemspec index 85b697e9..b78a6e13 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -5,9 +5,9 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 1.9.2' s.name = 'jekyll' - s.version = '1.4.0' + s.version = '1.4.3' s.license = 'MIT' - s.date = '2013-12-09' + s.date = '2014-01-13' s.rubyforge_project = 'jekyll' s.summary = "A simple, blog aware, static site generator." @@ -96,6 +96,7 @@ Gem::Specification.new do |s| lib/jekyll/converters/markdown/maruku_parser.rb lib/jekyll/converters/markdown/rdiscount_parser.rb lib/jekyll/converters/markdown/redcarpet_parser.rb + lib/jekyll/converters/sass.rb lib/jekyll/converters/textile.rb lib/jekyll/convertible.rb lib/jekyll/core_ext.rb @@ -132,10 +133,12 @@ Gem::Specification.new do |s| script/bootstrap script/branding script/cibuild + script/rebund site/.gitignore site/CNAME site/README site/_config.yml + site/_data/docs.yml site/_includes/analytics.html site/_includes/css/gridism.css site/_includes/css/normalize.css @@ -175,6 +178,7 @@ Gem::Specification.new do |s| site/_posts/2013-12-16-jekyll-1-4-2-released.markdown site/_posts/2014-01-13-jekyll-1-4-3-released.markdown site/css/screen.css + site/docs/assets.md site/docs/configuration.md site/docs/contributing.md site/docs/datafiles.md @@ -228,7 +232,6 @@ Gem::Specification.new do |s| test/source/_config.dev.toml test/source/_data/languages.yml test/source/_data/members.yaml - test/source/_data/products.yml test/source/_includes/include.html test/source/_includes/params.html test/source/_includes/sig.markdown @@ -281,15 +284,15 @@ Gem::Specification.new do |s| test/source/deal.with.dots.html test/source/foo/_posts/bar/2008-12-12-topical-post.textile test/source/index.html + test/source/js/coffeescript.coffee test/source/products.yml test/source/properties.html test/source/sitemap.xml - test/source/symlink-test/_data - test/source/symlink-test/symlinked-dir - test/source/symlink-test/symlinked-file + test/source/unpublished.html test/source/win/_posts/2009-05-24-yaml-linebreak.markdown test/source/z_category/_posts/2008-9-23-categories.textile test/suite.rb + test/test_coffeescript.rb test/test_command.rb test/test_configuration.rb test/test_convertible.rb @@ -307,6 +310,7 @@ Gem::Specification.new do |s| test/test_redcarpet.rb test/test_redcloth.rb test/test_related_posts.rb + test/test_sass.rb test/test_site.rb test/test_tags.rb test/test_url.rb From ed12ad930a05f6c4140e750763617881880a358a Mon Sep 17 00:00:00 2001 From: Anatol Broder Date: Tue, 4 Feb 2014 21:37:20 +0100 Subject: [PATCH 69/70] Fix wrong semantic --- site/_layouts/news_item.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/_layouts/news_item.html b/site/_layouts/news_item.html index d3955020..72927b9e 100644 --- a/site/_layouts/news_item.html +++ b/site/_layouts/news_item.html @@ -21,7 +21,7 @@ layout: news {{ page.author }}
-

+

{{ content }} -

+
From 182a49fcff1ab7c3ad59df34ad8877848c4ec890 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 4 Feb 2014 17:04:01 -0500 Subject: [PATCH 70/70] Update history to reflect merge of #2013 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index b505f089..a6ffeeaf 100644 --- a/History.markdown +++ b/History.markdown @@ -99,6 +99,7 @@ * Add `jekyll-font-awesome` plugin to plugin list (#1999) * Add `sublime-jekyll` to list of Editor plugins (#2001) * Add `vim-jekyll` to the list of Editor plugins (#2005) + * Fix non-semantic nesting of `p` tags in `news_item` layout (#2013) ## 1.4.3 / 2014-01-13