From 528c94e4814fb541723c02a5fbf93e793d757341 Mon Sep 17 00:00:00 2001 From: Rafael Revi Date: Fri, 10 May 2013 02:20:43 -0400 Subject: [PATCH 01/29] new test case: numbers in categories --- test/source/_posts/2013-05-10-number-category.textile | 7 +++++++ test/test_post.rb | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 test/source/_posts/2013-05-10-number-category.textile diff --git a/test/source/_posts/2013-05-10-number-category.textile b/test/source/_posts/2013-05-10-number-category.textile new file mode 100644 index 00000000..1a490a88 --- /dev/null +++ b/test/source/_posts/2013-05-10-number-category.textile @@ -0,0 +1,7 @@ +--- +layout: default +title: Number Category in YAML +category: 2013 +--- + +Please make me pass \ No newline at end of file diff --git a/test/test_post.rb b/test/test_post.rb index b28af071..d295155c 100644 --- a/test/test_post.rb +++ b/test/test_post.rb @@ -422,6 +422,11 @@ class TestPost < Test::Unit::TestCase post = setup_post("2009-01-27-empty-categories.textile") assert_equal [], post.categories end + + should "recognize number category in yaml" do + post = setup_post("2013-05-10-number-category.textile") + assert post.categories.include?('2013') + end should "recognize tag in yaml" do post = setup_post("2009-05-18-tag.textile") From 2a6c722e78c4bd0e9f9e0988ab79a789e8959cd3 Mon Sep 17 00:00:00 2001 From: Roland Warmerdam Date: Thu, 9 May 2013 22:03:44 +1200 Subject: [PATCH 02/29] Add a `data-lang` attribute to code blocks --- lib/jekyll/converters/markdown/redcarpet_parser.rb | 2 +- test/test_redcarpet.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/jekyll/converters/markdown/redcarpet_parser.rb b/lib/jekyll/converters/markdown/redcarpet_parser.rb index 48be65cc..9af80571 100644 --- a/lib/jekyll/converters/markdown/redcarpet_parser.rb +++ b/lib/jekyll/converters/markdown/redcarpet_parser.rb @@ -5,7 +5,7 @@ module Jekyll module CommonMethods def add_code_tags(code, lang) - code = code.sub(/
/, "
")
+            code = code.sub(/
/, "
")
             code = code.sub(/<\/pre>/,"
") end end diff --git a/test/test_redcarpet.rb b/test/test_redcarpet.rb index ce4cb826..c6e8b922 100644 --- a/test/test_redcarpet.rb +++ b/test/test_redcarpet.rb @@ -30,9 +30,9 @@ class TestRedcarpet < Test::Unit::TestCase setup do @markdown = Converters::Markdown.new @config.merge({ 'pygments' => true }) end - + should "render fenced code blocks with syntax highlighting" do - assert_equal "
puts "Hello world"\n
", @markdown.convert( + assert_equal "
puts "Hello world"\n
", @markdown.convert( <<-EOS ```ruby puts "Hello world" @@ -48,7 +48,7 @@ puts "Hello world" end should "render fenced code blocks without syntax highlighting" do - assert_equal "
puts "Hello world"\n
", @markdown.convert( + assert_equal "
puts "Hello world"\n
", @markdown.convert( <<-EOS ```ruby puts "Hello world" From eae3ae847976524aaa26450c6c4f5f03fac54055 Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Fri, 10 May 2013 14:07:23 +0200 Subject: [PATCH 03/29] fix handling of number categories --- lib/jekyll/post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index 571d854d..9d10a5cb 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -76,7 +76,7 @@ module Jekyll def populate_categories if self.categories.empty? - self.categories = self.data.pluralized_array('category', 'categories').map {|c| c.downcase} + self.categories = self.data.pluralized_array('category', 'categories').map {|c| c.to_s.downcase} end self.categories.flatten! end From 17cdd59206350c330e81eb2990474daf946e3f87 Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Fri, 10 May 2013 14:07:43 +0200 Subject: [PATCH 04/29] adjust tests to new test post --- test/test_generated_site.rb | 2 +- test/test_site.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_generated_site.rb b/test/test_generated_site.rb index cb8b5486..35c451c5 100644 --- a/test/test_generated_site.rb +++ b/test/test_generated_site.rb @@ -14,7 +14,7 @@ class TestGeneratedSite < Test::Unit::TestCase end should "ensure post count is as expected" do - assert_equal 33, @site.posts.size + assert_equal 34, @site.posts.size end should "insert site.posts into the index" do diff --git a/test/test_site.rb b/test/test_site.rb index 37fec83f..4e46ba7f 100644 --- a/test/test_site.rb +++ b/test/test_site.rb @@ -172,7 +172,7 @@ class TestSite < Test::Unit::TestCase posts = Dir[source_dir("**", "_posts", "**", "*")] posts.delete_if { |post| File.directory?(post) && !Post.valid?(post) } - categories = %w(bar baz category foo z_category publish_test win).sort + categories = %w(2013 bar baz category foo z_category publish_test win).sort assert_equal posts.size - @num_invalid_posts, @site.posts.size assert_equal categories, @site.categories.keys.sort From e22b1bb74a79732ed8a129b501411a91feee578c Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 11 May 2013 17:40:00 +0200 Subject: [PATCH 05/29] Add deprecation support for pages in subfolders with relative permalinks. --- lib/jekyll/configuration.rb | 5 ++++- lib/jekyll/page.rb | 4 ++++ lib/jekyll/site.rb | 11 +++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index d6856bb1..c76dde9e 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -19,7 +19,10 @@ module Jekyll 'limit_posts' => 0, 'lsi' => false, 'future' => true, # remove and make true just default - 'pygments' => true, # remove and make true just default + 'pygments' => true, + + 'relative_permalinks' => true, # backwards-compatibility with < 1.0 + # will be set to false once 1.1 hits 'markdown' => 'maruku', 'permalink' => 'date', diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index 730af13f..e44cf329 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -144,5 +144,9 @@ module Jekyll def index? basename == 'index' end + + def uses_relative_permalinks + permalink && !permalink.include?(File.expand_path(@dir, site.source)) + end end end diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index d8a36e1b..3264cfc5 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -231,6 +231,7 @@ module Jekyll end self.pages.each do |page| + relative_permalinks_deprecation_method if page.uses_relative_permalinks page.render(self.layouts, payload) end @@ -418,5 +419,15 @@ module Jekyll post.categories.each { |c| self.categories[c] << post } post.tags.each { |c| self.tags[c] << post } end + + def relative_permalinks_deprecation_method + if config['relative_permalinks'] && !@deprecated_relative_permalinks + Jekyll::Logger.warn "Deprecation:", "Starting in 1.1, permalinks for pages" + + " in subfolders must be absolute" + + " permalinks relative to the site" + + " source." + @deprecated_relative_permalinks = true + end + end end end From b355ef646924830ab465fc3f29c9d8c2e7120a06 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 11 May 2013 17:49:20 +0200 Subject: [PATCH 06/29] Add jekyll doctor command --- bin/jekyll | 14 ++++++++++++++ lib/jekyll/page.rb | 9 ++++++++- lib/jekyll/site.rb | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/bin/jekyll b/bin/jekyll index 6d3767e6..2e631bbb 100755 --- a/bin/jekyll +++ b/bin/jekyll @@ -86,6 +86,20 @@ command :serve do |c| end alias_command :server, :serve +command :doctor do |c| + c.syntax = 'jekyll doctor' + c.description = 'Search site and print specific deprecation warnings' + + c.option '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file' + + c.action do |args, options| + options = normalize_options(options.__hash__) + options = Jekyll.configuration(options) + Jekyll::Commands::Doctor.process(options) + end +end +alias_command :hyde, :doctor + command :import do |c| c.syntax = 'jekyll import [options]' c.description = 'Import your old blog to Jekyll' diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index e44cf329..872c6cce 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -114,7 +114,14 @@ module Jekyll self.data.deep_merge({ "url" => self.url, "content" => self.content, - "path" => self.data['path'] || File.join(@dir, @name).sub(/\A\//, '') }) + "path" => self.data['path'] || path }) + end + + # The path to the source file + # + # Returns the path to the source file + def path + File.join(@dir, @name).sub(/\A\//, '') end # Obtain destination path. diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 3264cfc5..69c4815f 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -422,6 +422,7 @@ module Jekyll def relative_permalinks_deprecation_method if config['relative_permalinks'] && !@deprecated_relative_permalinks + puts # Places newline after "Generating..." Jekyll::Logger.warn "Deprecation:", "Starting in 1.1, permalinks for pages" + " in subfolders must be absolute" + " permalinks relative to the site" + From 6294c4a2049ed2552b29fbdc93e8eb7826c226e7 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 11 May 2013 17:56:42 +0200 Subject: [PATCH 07/29] Better-formatted output with relation to 'Generating... done.' --- lib/jekyll/site.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 69c4815f..549cf098 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -422,11 +422,12 @@ module Jekyll def relative_permalinks_deprecation_method if config['relative_permalinks'] && !@deprecated_relative_permalinks - puts # Places newline after "Generating..." + $stderr.puts # Places newline after "Generating..." Jekyll::Logger.warn "Deprecation:", "Starting in 1.1, permalinks for pages" + " in subfolders must be absolute" + " permalinks relative to the site" + " source." + $stderr.print Jekyll::Logger.formatted_topic("") + "..." # for "done." @deprecated_relative_permalinks = true end end From 19bc54bb079f0abec8048ec606c6ff276cbc1106 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 11 May 2013 18:02:53 +0200 Subject: [PATCH 08/29] Add doctor command --- lib/jekyll/commands/doctor.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lib/jekyll/commands/doctor.rb diff --git a/lib/jekyll/commands/doctor.rb b/lib/jekyll/commands/doctor.rb new file mode 100644 index 00000000..8338879d --- /dev/null +++ b/lib/jekyll/commands/doctor.rb @@ -0,0 +1,24 @@ +module Jekyll + module Commands + class Doctor < Command + class << self + def process(options) + site = Jekyll::Site.new(options) + site.read + + deprecate_relative_permalinks(site) + end + + def deprecate_relative_permalinks(site) + site.pages.each do |page| + if page.uses_relative_permalinks + Jekyll::Logger.warn "Deprecation:", "'#{page.path}' uses relative" + + " permalinks which will be automatically" + + " deprecated in Jekyll v1.1." + end + end + end + end + end + end +end From 1f23bc4dc01a7ed88b75ae0204a1ed06bf2cd32d Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 11 May 2013 18:03:03 +0200 Subject: [PATCH 09/29] Add support for relative permalinks --- lib/jekyll/page.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index 872c6cce..68eaacc0 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -64,7 +64,11 @@ module Jekyll return @url if @url url = if permalink - permalink + if uses_relative_permalinks + File.join(@dir, permalink) + else + permalink + end else { "path" => @dir, From eda11aa534aa1c9a6263597e9d5595ff17dfbcde Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Sat, 11 May 2013 18:03:51 +0200 Subject: [PATCH 10/29] ensure number category is NOT included as fixnum --- test/test_post.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_post.rb b/test/test_post.rb index d295155c..9ea972a8 100644 --- a/test/test_post.rb +++ b/test/test_post.rb @@ -426,6 +426,7 @@ class TestPost < Test::Unit::TestCase should "recognize number category in yaml" do post = setup_post("2013-05-10-number-category.textile") assert post.categories.include?('2013') + assert !post.categories.include?(2013) end should "recognize tag in yaml" do From 161244fd7855da832bb671b083addb76d957f488 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 11 May 2013 18:06:26 +0200 Subject: [PATCH 11/29] Add better language and link to Upgrading page in docs for relative permalinks deprecation msg --- lib/jekyll/site.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 549cf098..16ccd7e9 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -424,9 +424,10 @@ module Jekyll if config['relative_permalinks'] && !@deprecated_relative_permalinks $stderr.puts # Places newline after "Generating..." Jekyll::Logger.warn "Deprecation:", "Starting in 1.1, permalinks for pages" + - " in subfolders must be absolute" + - " permalinks relative to the site" + - " source." + " in subfolders must be relative to the" + + " site source directory, not the parent" + + " directory. Check http://jekyllrb.com/docs/upgrading/"+ + " for more info." $stderr.print Jekyll::Logger.formatted_topic("") + "..." # for "done." @deprecated_relative_permalinks = true end From 0e82b4eb2f49873be0e84e8deaf10eaee813733b Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 11 May 2013 18:26:20 +0200 Subject: [PATCH 12/29] Use site config to determine whether permalinks should be relative. --- lib/jekyll/page.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index 68eaacc0..58da1b83 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -64,7 +64,7 @@ module Jekyll return @url if @url url = if permalink - if uses_relative_permalinks + if site.config['relative_permalinks'] File.join(@dir, permalink) else permalink From c44d4248ac27dddc267e7dc0909eb802b7b9bafb Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Sat, 11 May 2013 19:54:06 +0200 Subject: [PATCH 13/29] warn on use of deprecated "server_port" option --- lib/jekyll/configuration.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index d6856bb1..64434dcc 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -164,6 +164,12 @@ module Jekyll config.delete('server') end + if config.has_key? 'server_port' + Jekyll::Logger.warn "Deprecation:", "The 'server_port' configuration option" + + " has been renamed to 'port'. Update your config file" + + " accordingly." + end + config end From a8788f4a0aa6afc6226989d4666f8f0dfdc6baad Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Sat, 11 May 2013 19:57:11 +0200 Subject: [PATCH 14/29] copy over deprecated config option to new one --- lib/jekyll/configuration.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index 64434dcc..42082229 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -168,6 +168,9 @@ module Jekyll Jekyll::Logger.warn "Deprecation:", "The 'server_port' configuration option" + " has been renamed to 'port'. Update your config file" + " accordingly." + # copy but don't overwrite: + config['port'] = config['server_port'] unless config.has_key?('port') + config.delete('server_port') end config From 1b80fc8cc86c5147ce8806b43611e9212740b931 Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Sat, 11 May 2013 20:03:55 +0200 Subject: [PATCH 15/29] always be polite to the user :) --- lib/jekyll/configuration.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index 42082229..50dca537 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -166,8 +166,8 @@ module Jekyll if config.has_key? 'server_port' Jekyll::Logger.warn "Deprecation:", "The 'server_port' configuration option" + - " has been renamed to 'port'. Update your config file" + - " accordingly." + " has been renamed to 'port'. Please update your config" + + " file accordingly." # copy but don't overwrite: config['port'] = config['server_port'] unless config.has_key?('port') config.delete('server_port') From 6167747440a7083d7e26b9c462e1f97197b13d9a Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 May 2013 01:07:58 +0200 Subject: [PATCH 16/29] Say happy things when everything is cool --- lib/jekyll/commands/doctor.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/commands/doctor.rb b/lib/jekyll/commands/doctor.rb index 8338879d..5ac2a68d 100644 --- a/lib/jekyll/commands/doctor.rb +++ b/lib/jekyll/commands/doctor.rb @@ -6,17 +6,22 @@ module Jekyll site = Jekyll::Site.new(options) site.read - deprecate_relative_permalinks(site) + unless deprecated_relative_permalinks(site) + Jekyll::Logger.info "Your test results", "are in. Everything looks fine." + end end - def deprecate_relative_permalinks(site) + def deprecated_relative_permalinks(site) + contains_deprecated_pages = false site.pages.each do |page| if page.uses_relative_permalinks Jekyll::Logger.warn "Deprecation:", "'#{page.path}' uses relative" + " permalinks which will be automatically" + " deprecated in Jekyll v1.1." + contains_deprecated_pages = true end end + contains_deprecated_pages end end end From 2e1316ec8b96215bc1cd0da4afd4e8757e981472 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 May 2013 01:08:33 +0200 Subject: [PATCH 17/29] Ensure the page is in a subdir. That's the only time it's eff'd. --- lib/jekyll/page.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index 58da1b83..1a46c854 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -157,7 +157,7 @@ module Jekyll end def uses_relative_permalinks - permalink && !permalink.include?(File.expand_path(@dir, site.source)) + permalink && @dir != "" && !permalink.include?(File.expand_path(@dir, site.source)) end end end From d9f0dce67d518327d231e6d0ac2879fdba156270 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 May 2013 01:16:52 +0200 Subject: [PATCH 18/29] make sure relative_permalinks is set to TRUE --- lib/jekyll/page.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index 1a46c854..ef7c4d3a 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -157,7 +157,7 @@ module Jekyll end def uses_relative_permalinks - permalink && @dir != "" && !permalink.include?(File.expand_path(@dir, site.source)) + permalink && @dir != "" && site.config['relative_permalinks'] end end end From c59cfcfd2e6a88ab22f86f7ec92a89c3bfeebd51 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 May 2013 01:19:04 +0200 Subject: [PATCH 19/29] Not automatically deprecated. --- lib/jekyll/commands/doctor.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/commands/doctor.rb b/lib/jekyll/commands/doctor.rb index 5ac2a68d..1819e0c7 100644 --- a/lib/jekyll/commands/doctor.rb +++ b/lib/jekyll/commands/doctor.rb @@ -16,8 +16,8 @@ module Jekyll site.pages.each do |page| if page.uses_relative_permalinks Jekyll::Logger.warn "Deprecation:", "'#{page.path}' uses relative" + - " permalinks which will be automatically" + - " deprecated in Jekyll v1.1." + " permalinks which will be deprecated in" + + " Jekyll v1.1 and beyond." contains_deprecated_pages = true end end From d9e056bd6052db4ace79bb6db0aacbeee8b02f04 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 May 2013 11:51:52 +0200 Subject: [PATCH 20/29] Update history to reflect merge of #1084 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 10fb8678..a9927501 100644 --- a/History.markdown +++ b/History.markdown @@ -1,6 +1,7 @@ ## HEAD ### Major Enhancements ### Minor Enhancements + * Deprecate old config `server_port`, match to `port` if `port` isn't set (#1084) * Update pygments.rb version to 0.5.0 (#1061) * Update Kramdown version to 1.0.2 (#1067) From 91317b29b330cc791ea5eed03bd8f84371a0b632 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 May 2013 11:53:37 +0200 Subject: [PATCH 21/29] Update history to reflect merge of #1078 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index a9927501..60757b7b 100644 --- a/History.markdown +++ b/History.markdown @@ -6,6 +6,7 @@ * Update Kramdown version to 1.0.2 (#1067) ### Bug Fixes + * Fix issue when categories are numbers (#1078) * Catching that Redcarpet gem isn't installed (#1059) ### Site Enhancements From 427bb6aec7682926567cea19eba92cb7616f1461 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 May 2013 11:57:56 +0200 Subject: [PATCH 22/29] Update history to reflect merge of #1081. --- History.markdown | 3 +++ 1 file changed, 3 insertions(+) diff --git a/History.markdown b/History.markdown index 60757b7b..d916bb1d 100644 --- a/History.markdown +++ b/History.markdown @@ -1,5 +1,8 @@ ## HEAD ### Major Enhancements + * Add `jekyll doctor` command to check site for any known compatibility problems (#1081) + * Backwards-compatibilize relative permalinks (#1081) + ### Minor Enhancements * Deprecate old config `server_port`, match to `port` if `port` isn't set (#1084) * Update pygments.rb version to 0.5.0 (#1061) From 7671b45a929ed70b9e68b008977f5be530b4037c Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 May 2013 12:12:49 +0200 Subject: [PATCH 23/29] Update history to reflect merge of #1066. --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index d916bb1d..522f7095 100644 --- a/History.markdown +++ b/History.markdown @@ -4,6 +4,7 @@ * Backwards-compatibilize relative permalinks (#1081) ### Minor Enhancements + * Add a `data-lang=""` attribute to Redcarpet code blocks (#1066) * Deprecate old config `server_port`, match to `port` if `port` isn't set (#1084) * Update pygments.rb version to 0.5.0 (#1061) * Update Kramdown version to 1.0.2 (#1067) From 61faef46cce602feff9b8deb20dba5c2c01c4c93 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 May 2013 14:07:30 +0200 Subject: [PATCH 24/29] Add documentation about relative_permalinks. #1081 --- site/docs/configuration.md | 2 ++ site/docs/upgrading.md | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/site/docs/configuration.md b/site/docs/configuration.md index d8da48b4..ffdbf6ef 100644 --- a/site/docs/configuration.md +++ b/site/docs/configuration.md @@ -253,6 +253,8 @@ show_drafts: nil limit_posts: 0 pygments: true +relative_permalinks: true + permalink: date paginate_path: 'page:num' diff --git a/site/docs/upgrading.md b/site/docs/upgrading.md index 6c5b42d2..2e85533e 100644 --- a/site/docs/upgrading.md +++ b/site/docs/upgrading.md @@ -33,6 +33,26 @@ rebuild each time a file changes, just add the `--watch` flag at the end. or `jekyll build`.

+### Absolute Permalinks + +In older Jekyll versions, one could use relative permalinks for pages in +subdirectories. As of Jekyll v1.0, **we introduced absolute permalinks**, +which do not take advantage of the page's directory position to write the +permalink. As of Jekyll v1.0.2, a new switch, `relative_permalinks`, +allows the user to turn relative permalinks on and off at will, in order +to preserve the old behaviour, or use the new behaviour. As of v1.0.2, +this switch defaults to `true`, but it will default to `false` +in v1.1.0 and beyond. + + + ### Custom Config File Rather than passing individual flags via the command line, you can now pass an From 56e7f7688e7c8c6c7deac12be2fc87d61e5d3de4 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 May 2013 14:08:11 +0200 Subject: [PATCH 25/29] Add note in history about documentation for #1081 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 522f7095..73b14624 100644 --- a/History.markdown +++ b/History.markdown @@ -14,6 +14,7 @@ * Catching that Redcarpet gem isn't installed (#1059) ### Site Enhancements + * Add documentation about `relative_permalinks` (#1081) * Remove pygments-installation instructions, as pygments.rb is bundled with it (#1079) * Move pages to be Pages for realz (#985) * Updated links to Liquid documentation (#1073) From 8051df0f4ca4df96e684661f610e8a3b97bc2e1f Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 May 2013 15:26:45 +0200 Subject: [PATCH 26/29] Release 1.0.2 --- History.markdown | 10 ++++++++-- jekyll.gemspec | 6 ++++-- lib/jekyll.rb | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/History.markdown b/History.markdown index 73b14624..207ce659 100644 --- a/History.markdown +++ b/History.markdown @@ -1,4 +1,12 @@ ## HEAD +### Major Enhancements +### Minor Enhancements +### Bug Fixes +### Site Enhancements +### Development Fixes + +## 1.0.2 / 2013-05-12 + ### Major Enhancements * Add `jekyll doctor` command to check site for any known compatibility problems (#1081) * Backwards-compatibilize relative permalinks (#1081) @@ -19,8 +27,6 @@ * Move pages to be Pages for realz (#985) * Updated links to Liquid documentation (#1073) -### Development Fixes - ## 1.0.1 / 2013-05-08 ### Minor Enhancements diff --git a/jekyll.gemspec b/jekyll.gemspec index dbfa6d7c..516bc700 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -4,9 +4,9 @@ Gem::Specification.new do |s| s.rubygems_version = '1.3.5' s.name = 'jekyll' - s.version = '1.0.1' + s.version = '1.0.2' s.license = 'MIT' - s.date = '2013-05-08' + s.date = '2013-05-12' s.rubyforge_project = 'jekyll' s.summary = "A simple, blog aware, static site generator." @@ -71,6 +71,7 @@ Gem::Specification.new do |s| lib/jekyll.rb lib/jekyll/command.rb lib/jekyll/commands/build.rb + lib/jekyll/commands/doctor.rb lib/jekyll/commands/new.rb lib/jekyll/commands/serve.rb lib/jekyll/configuration.rb @@ -203,6 +204,7 @@ Gem::Specification.new do |s| test/source/_posts/2013-01-12-no-layout.textile test/source/_posts/2013-03-19-not-a-post.markdown/.gitkeep test/source/_posts/2013-04-11-custom-excerpt.markdown + test/source/_posts/2013-05-10-number-category.textile test/source/_posts/es/2008-11-21-nested.textile test/source/about.html test/source/category/_posts/2008-9-23-categories.textile diff --git a/lib/jekyll.rb b/lib/jekyll.rb index 4f3bc1cc..d909373b 100644 --- a/lib/jekyll.rb +++ b/lib/jekyll.rb @@ -56,7 +56,7 @@ require_all 'jekyll/tags' SafeYAML::OPTIONS[:suppress_warnings] = true module Jekyll - VERSION = '1.0.1' + VERSION = '1.0.2' # Public: Generate a Jekyll configuration Hash by merging the default # options with anything in _config.yml, and adding the given options on top. From f56090be3f05bda8845f75ead25bbdbd8aa2a163 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 May 2013 16:05:18 +0200 Subject: [PATCH 27/29] Updated language for relative_permalinks --- site/docs/upgrading.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/site/docs/upgrading.md b/site/docs/upgrading.md index 2e85533e..cea5a923 100644 --- a/site/docs/upgrading.md +++ b/site/docs/upgrading.md @@ -35,14 +35,13 @@ rebuild each time a file changes, just add the `--watch` flag at the end. ### Absolute Permalinks -In older Jekyll versions, one could use relative permalinks for pages in -subdirectories. As of Jekyll v1.0, **we introduced absolute permalinks**, -which do not take advantage of the page's directory position to write the -permalink. As of Jekyll v1.0.2, a new switch, `relative_permalinks`, -allows the user to turn relative permalinks on and off at will, in order -to preserve the old behaviour, or use the new behaviour. As of v1.0.2, -this switch defaults to `true`, but it will default to `false` -in v1.1.0 and beyond. +In Jekyll v1.0, we introduced absolute permalinks for pages in subdirectories. +Until v1.1, it is **opt-in**. Starting with v1.1, however, absolute permalinks +will become **opt-out**, meaning Jekyll will default to using absolute permalinks +instead of relative permalinks. + +* To use absolute permalinks, set `relative_permalinks: true` in your configuration file. +* To continue using relative permalinks, set `relative_permalinks: false` in your configuration file.