From e1f04968e8f5a18d9b09a8a86bc048061e77dcbc Mon Sep 17 00:00:00 2001 From: "Benjamin J. Balter" Date: Thu, 18 Apr 2013 10:10:59 -0400 Subject: [PATCH 01/66] Use pages for documentation, not posts, fixes #980. --- site/_config.yml | 1 - .../configuration.md} | 1 + .../contributing.md} | 1 + .../deployment-methods.md} | 1 + site/{_posts/2012-07-01-extras.md => docs/extras.md} | 1 + .../2012-07-01-frontmatter.md => docs/frontmatter.md} | 1 + .../github-pages.md} | 1 + site/{_posts/2012-07-01-heroku.md => docs/heroku.md} | 1 + site/docs/index.html | 11 ----------- site/{_posts/2012-07-01-home.md => docs/index.md} | 0 .../installation.md} | 1 + .../2012-07-01-migrations.md => docs/migrations.md} | 1 + site/{_posts/2012-07-01-pages.md => docs/pages.md} | 1 + .../2012-07-01-pagination.md => docs/pagination.md} | 1 + .../2012-07-01-permalinks.md => docs/permalinks.md} | 1 + .../{_posts/2012-07-01-plugins.md => docs/plugins.md} | 1 + site/{_posts/2012-07-01-posts.md => docs/posts.md} | 1 + .../2012-07-01-resources.md => docs/resources.md} | 1 + site/{_posts/2012-07-01-sites.md => docs/sites.md} | 1 + .../2012-07-01-structure.md => docs/structure.md} | 1 + .../2012-07-01-templates.md => docs/templates.md} | 1 + .../troubleshooting.md} | 1 + site/{_posts/2012-07-01-usage.md => docs/usage.md} | 1 + .../2012-07-01-variables.md => docs/variables.md} | 1 + 24 files changed, 21 insertions(+), 12 deletions(-) rename site/{_posts/2012-07-01-configuration.md => docs/configuration.md} (99%) rename site/{_posts/2012-07-01-contributing.md => docs/contributing.md} (99%) rename site/{_posts/2012-07-01-deployment-methods.md => docs/deployment-methods.md} (99%) rename site/{_posts/2012-07-01-extras.md => docs/extras.md} (99%) rename site/{_posts/2012-07-01-frontmatter.md => docs/frontmatter.md} (99%) rename site/{_posts/2012-07-01-github-pages.md => docs/github-pages.md} (98%) rename site/{_posts/2012-07-01-heroku.md => docs/heroku.md} (84%) delete mode 100644 site/docs/index.html rename site/{_posts/2012-07-01-home.md => docs/index.md} (100%) rename site/{_posts/2012-07-01-installation.md => docs/installation.md} (98%) rename site/{_posts/2012-07-01-migrations.md => docs/migrations.md} (99%) rename site/{_posts/2012-07-01-pages.md => docs/pages.md} (99%) rename site/{_posts/2012-07-01-pagination.md => docs/pagination.md} (99%) rename site/{_posts/2012-07-01-permalinks.md => docs/permalinks.md} (99%) rename site/{_posts/2012-07-01-plugins.md => docs/plugins.md} (99%) rename site/{_posts/2012-07-01-posts.md => docs/posts.md} (99%) rename site/{_posts/2012-07-01-resources.md => docs/resources.md} (99%) rename site/{_posts/2012-07-01-sites.md => docs/sites.md} (97%) rename site/{_posts/2012-07-01-structure.md => docs/structure.md} (99%) rename site/{_posts/2012-07-01-templates.md => docs/templates.md} (99%) rename site/{_posts/2012-07-01-troubleshooting.md => docs/troubleshooting.md} (99%) rename site/{_posts/2012-07-01-usage.md => docs/usage.md} (98%) rename site/{_posts/2012-07-01-variables.md => docs/variables.md} (99%) diff --git a/site/_config.yml b/site/_config.yml index 2de2c7ff..a80e7c40 100644 --- a/site/_config.yml +++ b/site/_config.yml @@ -1,3 +1,2 @@ -permalink: /docs/:categories/:title pygments: true gauges_id: 503c5af6613f5d0f19000027 diff --git a/site/_posts/2012-07-01-configuration.md b/site/docs/configuration.md similarity index 99% rename from site/_posts/2012-07-01-configuration.md rename to site/docs/configuration.md index 1556d449..07fc5afc 100644 --- a/site/_posts/2012-07-01-configuration.md +++ b/site/docs/configuration.md @@ -3,6 +3,7 @@ layout: docs title: Configuration prev_section: structure next_section: frontmatter +permalink: /docs/configuration/ --- Jekyll allows you to concoct your sites in any way you can dream up, and it’s diff --git a/site/_posts/2012-07-01-contributing.md b/site/docs/contributing.md similarity index 99% rename from site/_posts/2012-07-01-contributing.md rename to site/docs/contributing.md index dcab4ffa..cc3754a4 100644 --- a/site/_posts/2012-07-01-contributing.md +++ b/site/docs/contributing.md @@ -3,6 +3,7 @@ layout: docs title: Contributing prev_section: deployment-methods next_section: troubleshooting +permalink: /docs/contributing/ --- So you've got an awesome idea to throw into Jekyll. Great! Please keep the diff --git a/site/_posts/2012-07-01-deployment-methods.md b/site/docs/deployment-methods.md similarity index 99% rename from site/_posts/2012-07-01-deployment-methods.md rename to site/docs/deployment-methods.md index 80b55ae3..dd4369ce 100644 --- a/site/_posts/2012-07-01-deployment-methods.md +++ b/site/docs/deployment-methods.md @@ -3,6 +3,7 @@ layout: docs title: Deployment methods prev_section: github-pages next_section: contributing +permalink: /docs/deployment-methods/ --- Sites built using Jekyll can be deployed in a large number of ways due to the static nature of the generated output. A few of the most common deployment techniques are described below. diff --git a/site/_posts/2012-07-01-extras.md b/site/docs/extras.md similarity index 99% rename from site/_posts/2012-07-01-extras.md rename to site/docs/extras.md index 2ac89e32..5f340fc4 100644 --- a/site/_posts/2012-07-01-extras.md +++ b/site/docs/extras.md @@ -3,6 +3,7 @@ layout: docs title: Extras prev_section: plugins next_section: github-pages +permalink: /docs/extras/ --- There are a number of (optional) extra features that Jekyll supports that you diff --git a/site/_posts/2012-07-01-frontmatter.md b/site/docs/frontmatter.md similarity index 99% rename from site/_posts/2012-07-01-frontmatter.md rename to site/docs/frontmatter.md index 337a7388..3591e8e9 100644 --- a/site/_posts/2012-07-01-frontmatter.md +++ b/site/docs/frontmatter.md @@ -3,6 +3,7 @@ layout: docs title: Front-matter prev_section: configuration next_section: posts +permalink: /docs/frontmatter/ --- The front-matter is where Jekyll starts to get really cool. Any file that diff --git a/site/_posts/2012-07-01-github-pages.md b/site/docs/github-pages.md similarity index 98% rename from site/_posts/2012-07-01-github-pages.md rename to site/docs/github-pages.md index 67f49403..fec89e73 100644 --- a/site/_posts/2012-07-01-github-pages.md +++ b/site/docs/github-pages.md @@ -3,6 +3,7 @@ layout: docs title: GitHub Pages prev_section: extras next_section: deployment-methods +permalink: /docs/github-pages/ --- [GitHub Pages](https://pages.github.com) are public web pages for users, diff --git a/site/_posts/2012-07-01-heroku.md b/site/docs/heroku.md similarity index 84% rename from site/_posts/2012-07-01-heroku.md rename to site/docs/heroku.md index 091239c5..84b448b6 100644 --- a/site/_posts/2012-07-01-heroku.md +++ b/site/docs/heroku.md @@ -3,6 +3,7 @@ layout: docs title: Heroku prev_section: github-pages next_section: manual-deployment +permalink: /docs/heroku/ --- Move along, people. Nothing to see here. diff --git a/site/docs/index.html b/site/docs/index.html deleted file mode 100644 index 95b00547..00000000 --- a/site/docs/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - Jekyll - - - - - diff --git a/site/_posts/2012-07-01-home.md b/site/docs/index.md similarity index 100% rename from site/_posts/2012-07-01-home.md rename to site/docs/index.md diff --git a/site/_posts/2012-07-01-installation.md b/site/docs/installation.md similarity index 98% rename from site/_posts/2012-07-01-installation.md rename to site/docs/installation.md index 33f111be..2dd2d60f 100644 --- a/site/_posts/2012-07-01-installation.md +++ b/site/docs/installation.md @@ -3,6 +3,7 @@ layout: docs title: Installation prev_section: home next_section: usage +permalink: /docs/installation/ --- Getting Jekyll installed and ready-to-go should only take a few minutes. If it diff --git a/site/_posts/2012-07-01-migrations.md b/site/docs/migrations.md similarity index 99% rename from site/_posts/2012-07-01-migrations.md rename to site/docs/migrations.md index e4d85dea..c3e6c987 100644 --- a/site/_posts/2012-07-01-migrations.md +++ b/site/docs/migrations.md @@ -3,6 +3,7 @@ layout: docs title: Blog migrations prev_section: variables next_section: templates +permalink: /docs/migrations/ --- If you’re switching to Jekyll from another blogging system, Jekyll’s importers diff --git a/site/_posts/2012-07-01-pages.md b/site/docs/pages.md similarity index 99% rename from site/_posts/2012-07-01-pages.md rename to site/docs/pages.md index c78d6145..36474677 100644 --- a/site/_posts/2012-07-01-pages.md +++ b/site/docs/pages.md @@ -3,6 +3,7 @@ layout: docs title: Creating pages prev_section: posts next_section: variables +permalink: /docs/pages/ --- In addition to [writing posts](../posts), another thing you may want to do with diff --git a/site/_posts/2012-07-01-pagination.md b/site/docs/pagination.md similarity index 99% rename from site/_posts/2012-07-01-pagination.md rename to site/docs/pagination.md index f1710d99..ec76b287 100644 --- a/site/_posts/2012-07-01-pagination.md +++ b/site/docs/pagination.md @@ -3,6 +3,7 @@ layout: docs title: Pagination prev_section: permalinks next_section: plugins +permalink: /docs/pagination/ --- With many websites—especially blogs—it’s very common to break the main listing diff --git a/site/_posts/2012-07-01-permalinks.md b/site/docs/permalinks.md similarity index 99% rename from site/_posts/2012-07-01-permalinks.md rename to site/docs/permalinks.md index b0a7c8cf..7f3b065a 100644 --- a/site/_posts/2012-07-01-permalinks.md +++ b/site/docs/permalinks.md @@ -3,6 +3,7 @@ layout: docs title: Permalinks prev_section: templates next_section: pagination +permalink: /docs/permalinks/ --- Jekyll supports a flexible way to build your site’s URLs. You can specify the diff --git a/site/_posts/2012-07-01-plugins.md b/site/docs/plugins.md similarity index 99% rename from site/_posts/2012-07-01-plugins.md rename to site/docs/plugins.md index e41f1bbc..e32c6fa8 100644 --- a/site/_posts/2012-07-01-plugins.md +++ b/site/docs/plugins.md @@ -3,6 +3,7 @@ layout: docs title: Plugins prev_section: assets next_section: extras +permalink: /docs/plugins/ --- Jekyll has a plugin system with hooks that allow you to create custom generated diff --git a/site/_posts/2012-07-01-posts.md b/site/docs/posts.md similarity index 99% rename from site/_posts/2012-07-01-posts.md rename to site/docs/posts.md index 80f6256e..27194bbe 100644 --- a/site/_posts/2012-07-01-posts.md +++ b/site/docs/posts.md @@ -3,6 +3,7 @@ layout: docs title: Writing posts prev_section: frontmatter next_section: pages +permalink: /docs/posts/ --- One of Jekyll’s best aspects is that it is “blog aware”. What does this mean, diff --git a/site/_posts/2012-07-01-resources.md b/site/docs/resources.md similarity index 99% rename from site/_posts/2012-07-01-resources.md rename to site/docs/resources.md index c14c584c..640b2343 100644 --- a/site/_posts/2012-07-01-resources.md +++ b/site/docs/resources.md @@ -2,6 +2,7 @@ layout: docs title: Resources prev_section: sites +permalink: /docs/resources/ --- Jekyll’s growing use is producing a wide variety of tutorials, frameworks, extensions, examples, and other resources that can be very helpful. Below is a collection of links to some of the most popular Jekyll resources. diff --git a/site/_posts/2012-07-01-sites.md b/site/docs/sites.md similarity index 97% rename from site/_posts/2012-07-01-sites.md rename to site/docs/sites.md index f28c0280..b5f24836 100644 --- a/site/_posts/2012-07-01-sites.md +++ b/site/docs/sites.md @@ -3,6 +3,7 @@ layout: docs title: Sites using Jekyll prev_section: troubleshooting next_section: resources +permalink: /docs/sites/ --- It’s interesting to see what designs and features others have come up diff --git a/site/_posts/2012-07-01-structure.md b/site/docs/structure.md similarity index 99% rename from site/_posts/2012-07-01-structure.md rename to site/docs/structure.md index 4401373d..2b80e08b 100644 --- a/site/_posts/2012-07-01-structure.md +++ b/site/docs/structure.md @@ -3,6 +3,7 @@ layout: docs title: Directory structure prev_section: usage next_section: configuration +permalink: /docs/structure/ --- Jekyll is, at its core, a text transformation engine. The concept behind the diff --git a/site/_posts/2012-07-01-templates.md b/site/docs/templates.md similarity index 99% rename from site/_posts/2012-07-01-templates.md rename to site/docs/templates.md index d6792ff6..d3e54256 100644 --- a/site/_posts/2012-07-01-templates.md +++ b/site/docs/templates.md @@ -3,6 +3,7 @@ layout: docs title: Templates prev_section: migrations next_section: permalinks +permalink: /docs/templates/ --- Jekyll uses the [Liquid](http://www.liquidmarkup.org/) templating language to diff --git a/site/_posts/2012-07-01-troubleshooting.md b/site/docs/troubleshooting.md similarity index 99% rename from site/_posts/2012-07-01-troubleshooting.md rename to site/docs/troubleshooting.md index 08dac8e8..dc5ecb50 100644 --- a/site/_posts/2012-07-01-troubleshooting.md +++ b/site/docs/troubleshooting.md @@ -3,6 +3,7 @@ layout: docs title: Troubleshooting prev_section: contributing next_section: sites +permalink: /docs/troubleshooting/ --- If you ever run into problems installing or using Jekyll, here’s a few tips that might be of help. If the problem you’re experiencing isn’t covered below, please [report an issue](https://github.com/mojombo/jekyll/issues/new) so the Jekyll community can make everyone’s experience better. diff --git a/site/_posts/2012-07-01-usage.md b/site/docs/usage.md similarity index 98% rename from site/_posts/2012-07-01-usage.md rename to site/docs/usage.md index 7088f8c3..4ff25e02 100644 --- a/site/_posts/2012-07-01-usage.md +++ b/site/docs/usage.md @@ -3,6 +3,7 @@ layout: docs title: Basic Usage prev_section: installation next_section: structure +permalink: /docs/usage/ --- The Jekyll gem makes a `jekyll` executable available to you in your Terminal diff --git a/site/_posts/2012-07-01-variables.md b/site/docs/variables.md similarity index 99% rename from site/_posts/2012-07-01-variables.md rename to site/docs/variables.md index 3188ec28..d4539cc0 100644 --- a/site/_posts/2012-07-01-variables.md +++ b/site/docs/variables.md @@ -3,6 +3,7 @@ layout: docs title: Variables prev_section: pages next_section: migrations +permalink: /docs/variables/ --- Jekyll traverses your site looking for files to process. Any files with [YAML From 0c04e5d55b9b574a9f9cb2fddc8a6896808e070c Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Wed, 8 May 2013 11:55:19 +0200 Subject: [PATCH 02/66] Catching that the Redcarpet gem has been installed. Fixes #1059 --- History.markdown | 2 ++ lib/jekyll/converters/markdown/redcarpet_parser.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/History.markdown b/History.markdown index 40bbda8f..9f50a6b6 100644 --- a/History.markdown +++ b/History.markdown @@ -2,6 +2,8 @@ ### Major Enhancements ### Minor Enhancements ### Bug Fixes + * Catching that Redcarpet gem isn't installed (#1059) + ### Site Enhancements ### Development Fixes diff --git a/lib/jekyll/converters/markdown/redcarpet_parser.rb b/lib/jekyll/converters/markdown/redcarpet_parser.rb index ceecd85e..48be65cc 100644 --- a/lib/jekyll/converters/markdown/redcarpet_parser.rb +++ b/lib/jekyll/converters/markdown/redcarpet_parser.rb @@ -52,7 +52,7 @@ module Jekyll include WithoutPygments end end - rescue LoadErro + rescue LoadError STDERR.puts 'You are missing a library required for Markdown. Please run:' STDERR.puts ' $ [sudo] gem install redcarpet' raise FatalException.new("Missing dependency: redcarpet") From 7977c5ed1b80f9f2d1e8ad5d03d704a1caefdc3c Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Thu, 9 May 2013 13:26:29 +0200 Subject: [PATCH 03/66] Update to kramdown 1.0.2 --- jekyll.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jekyll.gemspec b/jekyll.gemspec index f94413a7..50b20188 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -27,7 +27,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency('classifier', "~> 1.3") s.add_runtime_dependency('directory_watcher', "~> 1.4.1") s.add_runtime_dependency('maruku', "~> 0.5") - s.add_runtime_dependency('kramdown', "~> 0.14") + s.add_runtime_dependency('kramdown', "~> 1.0.2") s.add_runtime_dependency('pygments.rb', "~> 0.4.2") s.add_runtime_dependency('commander', "~> 4.1.3") s.add_runtime_dependency('safe_yaml', "~> 0.7.0") From 3fbddc583c36981c49b3050af41a7cb6f2482383 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Thu, 9 May 2013 13:48:34 +0200 Subject: [PATCH 04/66] Update history to reflect merge of #1067 --- History.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.markdown b/History.markdown index 9f50a6b6..a9f6a3ff 100644 --- a/History.markdown +++ b/History.markdown @@ -1,6 +1,8 @@ ## HEAD ### Major Enhancements ### Minor Enhancements + * Update Kramdown version to 1.0.2 (#1067) + ### Bug Fixes * Catching that Redcarpet gem isn't installed (#1059) From 8d0543d54c884539495443599368e6c008bb16c4 Mon Sep 17 00:00:00 2001 From: Mort Yao Date: Thu, 9 May 2013 13:51:13 +0200 Subject: [PATCH 05/66] Bump pygments.rb version to 0.5.0 --- jekyll.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jekyll.gemspec b/jekyll.gemspec index 50b20188..1c979018 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency('directory_watcher', "~> 1.4.1") s.add_runtime_dependency('maruku', "~> 0.5") s.add_runtime_dependency('kramdown', "~> 1.0.2") - s.add_runtime_dependency('pygments.rb', "~> 0.4.2") + s.add_runtime_dependency('pygments.rb', "~> 0.5.0") s.add_runtime_dependency('commander', "~> 4.1.3") s.add_runtime_dependency('safe_yaml', "~> 0.7.0") s.add_runtime_dependency('colorator', "~> 0.1") From 012717ed0434c518989f60fb5a538a5b3d4b64de Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Thu, 9 May 2013 13:51:55 +0200 Subject: [PATCH 06/66] Update history to reflect merge of #1061. --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index a9f6a3ff..59755cfa 100644 --- a/History.markdown +++ b/History.markdown @@ -1,6 +1,7 @@ ## HEAD ### Major Enhancements ### Minor Enhancements + * Update pygments.rb version to 0.5.0 (#1061) * Update Kramdown version to 1.0.2 (#1067) ### Bug Fixes From 1646c223c4fa035d79753258c91116866c6e2101 Mon Sep 17 00:00:00 2001 From: Rusty Geldmacher Date: Thu, 9 May 2013 10:09:12 -0400 Subject: [PATCH 07/66] Added jekyll-contentblocks to the plugins list --- site/_posts/2012-07-01-plugins.md | 1 + 1 file changed, 1 insertion(+) diff --git a/site/_posts/2012-07-01-plugins.md b/site/_posts/2012-07-01-plugins.md index 52229a0e..d73b0276 100644 --- a/site/_posts/2012-07-01-plugins.md +++ b/site/_posts/2012-07-01-plugins.md @@ -403,6 +403,7 @@ There are a few useful, prebuilt plugins at the following locations: - [jekyll-rendering](https://github.com/blackwinter/jekyll-rendering): Jekyll plugin to provide alternative rendering engines. - [jekyll-pagination](https://github.com/blackwinter/jekyll-pagination): Jekyll plugin to extend the pagination generator. - [jekyll-tagging](https://github.com/pattex/jekyll-tagging): Jekyll plugin to automatically generate a tag cloud and tag pages. +- [jekyll-contentblocks](https://github.com/rustygeldmacher/jekyll-contentblocks): Lets you use Rails-like content_for tags in your templates, for passing content from your posts up to your layouts. - [Generate YouTube Embed (tag)](https://gist.github.com/1805814) by [joelverhagen](https://github.com/joelverhagen): Jekyll plugin which allows you to embed a YouTube video in your page with the YouTube ID. Optionally specify width and height dimensions. Like “oEmbed Tag” but just for YouTube. - [JSON Filter](https://gist.github.com/1850654) by [joelverhagen](https://github.com/joelverhagen): filter that takes input text and outputs it as JSON. Great for rendering JavaScript. - [jekyll-beastiepress](https://github.com/okeeblow/jekyll-beastiepress): FreeBSD utility tags for Jekyll sites. From 528c94e4814fb541723c02a5fbf93e793d757341 Mon Sep 17 00:00:00 2001 From: Rafael Revi Date: Fri, 10 May 2013 02:20:43 -0400 Subject: [PATCH 08/66] 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 09/66] 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 10/66] 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 11/66] 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 07d87b2cc041bd2f50f1d3b1370f06412d5d5310 Mon Sep 17 00:00:00 2001 From: zachgersh Date: Fri, 10 May 2013 08:53:47 -0700 Subject: [PATCH 12/66] Changed link to liquid, was going to a dead link and it really bothered me. --- site/_posts/2012-07-01-templates.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/_posts/2012-07-01-templates.md b/site/_posts/2012-07-01-templates.md index 8519090a..349bc38c 100644 --- a/site/_posts/2012-07-01-templates.md +++ b/site/_posts/2012-07-01-templates.md @@ -5,7 +5,7 @@ prev_section: migrations next_section: permalinks --- -Jekyll uses the [Liquid](http://www.liquidmarkup.org/) templating language to +Jekyll uses the [Liquid](http://wiki.shopify.com/Liquid) templating language to process templates. All of the [standard Liquid tags and filters](http://wiki.github.com/shopify/liquid/liquid-for-designers) are supported, Jekyll even adds a few handy filters and tags of its own to make From 7a2a9d36a7625a0ac1620a8d4363e84e8a96dc27 Mon Sep 17 00:00:00 2001 From: zachgersh Date: Fri, 10 May 2013 08:59:56 -0700 Subject: [PATCH 13/66] Corrected additional liquid link on the Welcome page. --- site/_posts/2012-07-01-home.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/site/_posts/2012-07-01-home.md b/site/_posts/2012-07-01-home.md index b6aaa048..41fb5fda 100644 --- a/site/_posts/2012-07-01-home.md +++ b/site/_posts/2012-07-01-home.md @@ -15,7 +15,8 @@ development of Jekyll itself. Jekyll is a simple, blog-aware, static site generator. It takes a template directory containing raw text files in various formats, runs it through [Markdown](http://daringfireball.net/projects/markdown/) (or -[Textile](http://textile.sitemonks.com/)) and [Liquid](http://liquidmarkup.org/) +[Textile](http://textile.sitemonks.com/)) and +[Liquid](http://wiki.shopify.com/Liquid) converters, and spits out a complete, ready-to-publish static website suitable for serving with your favorite web server. Jekyll also happens to be the engine behind [GitHub Pages](http://pages.github.com), which means you can use Jekyll From 29c165ef4c1547cc06448d75d66dfb8d8e728665 Mon Sep 17 00:00:00 2001 From: zachgersh Date: Fri, 10 May 2013 09:13:18 -0700 Subject: [PATCH 14/66] Changed the liquid link in posts. --- site/_posts/2012-07-01-posts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/_posts/2012-07-01-posts.md b/site/_posts/2012-07-01-posts.md index 80f6256e..f0712915 100644 --- a/site/_posts/2012-07-01-posts.md +++ b/site/_posts/2012-07-01-posts.md @@ -95,7 +95,7 @@ Linking to a PDF for readers to download: It’s all well and good to have posts in a folder, but a blog is no use unless you have a list of posts somewhere. Creating an index of posts on another page (or in a [template](../templates)) is easy, thanks to the [Liquid template -language](http://liquidmarkup.org/) and its tags. Here’s a basic example of how +language](http://wiki.shopify.com/Liquid) and its tags. Here’s a basic example of how to create a list of links to your blog posts: {% highlight html %} From 59f2a41ced0aea86c02c1ddeddb6567756034d32 Mon Sep 17 00:00:00 2001 From: zachgersh Date: Fri, 10 May 2013 09:15:56 -0700 Subject: [PATCH 15/66] Changed liquid link of the homepage. --- site/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/index.html b/site/index.html index 0fd8317d..b01aea28 100644 --- a/site/index.html +++ b/site/index.html @@ -22,7 +22,7 @@ overview: true
From d675ef6662bb2628ad6a6fbb7378c9e6da496b7d Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 10 May 2013 23:28:42 +0200 Subject: [PATCH 23/66] Fixed some things on the site. --- site/_includes/primary-nav-items.html | 4 ++-- site/docs/upgrading.md | 2 +- site/index.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/_includes/primary-nav-items.html b/site/_includes/primary-nav-items.html index 6d6556f5..57956ae0 100644 --- a/site/_includes/primary-nav-items.html +++ b/site/_includes/primary-nav-items.html @@ -3,9 +3,9 @@ Overview
  • - Docsumentation + Docsumentation
  • View on GitHub
  • - \ No newline at end of file + diff --git a/site/docs/upgrading.md b/site/docs/upgrading.md index 7321ebec..6c5b42d2 100644 --- a/site/docs/upgrading.md +++ b/site/docs/upgrading.md @@ -5,7 +5,7 @@ prev_section: resources permalink: /docs/upgrading/ --- -Upgrading from an older version of Jekyll? A few things have changed in 1.0.0 +Upgrading from an older version of Jekyll? A few things have changed in 1.0 that you'll want to know about. diff --git a/site/index.html b/site/index.html index d96c7868..93203ebd 100644 --- a/site/index.html +++ b/site/index.html @@ -30,7 +30,7 @@ overview: true

    Permalinks, categories, pages, posts, and custom layouts are all first-class citizens here.

    - Migrate your blog → + Migrate your blog →
    From ef06f19a9e27c43cfcce19370509f3594494179c Mon Sep 17 00:00:00 2001 From: "maul.esel" Date: Sat, 11 May 2013 16:52:39 +0200 Subject: [PATCH 24/66] remove docs on installing pygments This is no longer needed as stated by @parkr in #1021, as jekyll now comes bundled with pygments.rb. Fixes #1021. --- site/docs/extras.md | 80 --------------------------------------------- 1 file changed, 80 deletions(-) diff --git a/site/docs/extras.md b/site/docs/extras.md index 4e820228..7e72ab8a 100644 --- a/site/docs/extras.md +++ b/site/docs/extras.md @@ -9,86 +9,6 @@ permalink: /docs/extras/ There are a number of (optional) extra features that Jekyll supports that you may want to install, depending on how you plan to use Jekyll. -## Pygments - -If you want syntax highlighting via the `{% raw %}{% highlight %}{% endraw %}` -tag in your posts, you’ll need to install [Pygments](http://pygments.org/). - -### Installing Pygments on OSX - -Mac OS X (Leopard onwards) comes preinstalled with Python, so on just about any -OS X machine you can install Pygments simply by running: - -{% highlight bash %} -$ sudo easy_install Pygments -{% endhighlight %} - -#### Installing Pygments using Homebrew - -Alternatively, you can install Pygments with -[Homebrew](http://mxcl.github.com/homebrew/), an excellent package manager for -OS X: - -{% highlight bash %} -$ brew install python -# export PATH="/usr/local/share/python:${PATH}" -$ pip install pygments -{% endhighlight %} - -
    -
    Homebrew's executable paths
    -

    - Homebrew doesn’t symlink the executables for you. For the Homebrew default - Cellar location and Python 2.7, be sure to add `/usr/local/share/python` to - your `PATH`. For more information, check out - the - Homebrew wiki. -

    -
    - -#### Installing Pygments using MacPorts - -If you use MacPorts, you can install Pygments by running: - -{% highlight bash %} -$ sudo port install python25 py25-pygments -{% endhighlight %} - -Seriously though, you should check out -[Homebrew](http://mxcl.github.com/homebrew/)—it’s awesome. - -### Installing Pygments on Arch Linux - -You can install Pygments using the pacman package manager as follows: - -{% highlight bash %} -$ sudo pacman -S python-pygments -{% endhighlight %} - -Or to use python2 for Pygments: - -{% highlight bash %} -$ sudo pacman -S python2-pygments -{% endhighlight %} - -### Installing Pygments on Ubuntu and Debian - -{% highlight bash %} -$ sudo apt-get install python-pygments -{% endhighlight %} - -### Installing Pygments on RedHat, Fedora, and CentOS - -{% highlight bash %} -$ sudo yum install python-pygments -{% endhighlight %} - -### Installing Pygments on Gentoo - -{% highlight bash %} -$ sudo emerge -av dev-python/pygments -{% endhighlight %} - ## LaTeX Support Maruku comes with optional support for LaTeX to PNG rendering via blahtex From d869f9934548250c029231eddbe6dbdf0cba32ce Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 11 May 2013 17:08:46 +0200 Subject: [PATCH 25/66] Update gemspec for new page-based docs. --- jekyll.gemspec | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/jekyll.gemspec b/jekyll.gemspec index 1c979018..dbfa6d7c 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -125,34 +125,33 @@ Gem::Specification.new do |s| site/_includes/top.html site/_layouts/default.html site/_layouts/docs.html - site/_posts/2012-07-01-configuration.md - site/_posts/2012-07-01-contributing.md - site/_posts/2012-07-01-deployment-methods.md - site/_posts/2012-07-01-extras.md - site/_posts/2012-07-01-frontmatter.md - site/_posts/2012-07-01-github-pages.md - site/_posts/2012-07-01-heroku.md - site/_posts/2012-07-01-home.md - site/_posts/2012-07-01-installation.md - site/_posts/2012-07-01-migrations.md - site/_posts/2012-07-01-pages.md - site/_posts/2012-07-01-pagination.md - site/_posts/2012-07-01-permalinks.md - site/_posts/2012-07-01-plugins.md - site/_posts/2012-07-01-posts.md - site/_posts/2012-07-01-resources.md - site/_posts/2012-07-01-sites.md - site/_posts/2012-07-01-structure.md - site/_posts/2012-07-01-templates.md - site/_posts/2012-07-01-troubleshooting.md - site/_posts/2012-07-01-upgrading.md - site/_posts/2012-07-01-usage.md - site/_posts/2012-07-01-variables.md site/css/gridism.css site/css/normalize.css site/css/pygments.css site/css/style.css - site/docs/index.html + site/docs/configuration.md + site/docs/contributing.md + site/docs/deployment-methods.md + site/docs/extras.md + site/docs/frontmatter.md + site/docs/github-pages.md + site/docs/heroku.md + site/docs/index.md + site/docs/installation.md + site/docs/migrations.md + site/docs/pages.md + site/docs/pagination.md + site/docs/permalinks.md + site/docs/plugins.md + site/docs/posts.md + site/docs/resources.md + site/docs/sites.md + site/docs/structure.md + site/docs/templates.md + site/docs/troubleshooting.md + site/docs/upgrading.md + site/docs/usage.md + site/docs/variables.md site/favicon.png site/img/article-footer.png site/img/footer-arrow.png From 470a187395c7eaf2c948d94ed719d0a33d3d198c Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 11 May 2013 17:10:50 +0200 Subject: [PATCH 26/66] Update history to reflect merge of #1079 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index dd9e4bd6..10fb8678 100644 --- a/History.markdown +++ b/History.markdown @@ -8,6 +8,7 @@ * Catching that Redcarpet gem isn't installed (#1059) ### Site Enhancements + * 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 e22b1bb74a79732ed8a129b501411a91feee578c Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 11 May 2013 17:40:00 +0200 Subject: [PATCH 27/66] 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 28/66] 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 29/66] 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 30/66] 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 31/66] 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 32/66] 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 33/66] 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 34/66] 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 35/66] 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 36/66] 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 37/66] 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 38/66] 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 39/66] 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 40/66] 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 41/66] 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 665e8d15f70a0d8a9a550f55a38370578be17923 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 May 2013 01:43:36 +0200 Subject: [PATCH 42/66] Turn off relative permalinks on Jekyll docs. --- site/_config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/site/_config.yml b/site/_config.yml index a80e7c40..8b8c6fda 100644 --- a/site/_config.yml +++ b/site/_config.yml @@ -1,2 +1,3 @@ pygments: true +relative_permalinks: false gauges_id: 503c5af6613f5d0f19000027 From d9e056bd6052db4ace79bb6db0aacbeee8b02f04 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 May 2013 11:51:52 +0200 Subject: [PATCH 43/66] 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 44/66] 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 45/66] 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 46/66] 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 47/66] 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 48/66] 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 49/66] 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 50/66] 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.