From bf1d9a79c4ee7c408127ca0e46a8b7d2340238fa Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 4 Oct 2013 14:27:58 -0400 Subject: [PATCH 1/3] Add support for gem-based plugins. --- lib/jekyll/configuration.rb | 1 + lib/jekyll/site.rb | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index de903a96689..5e923c27e51 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -12,6 +12,7 @@ class Configuration < Hash 'layouts' => '_layouts', 'data_source' => '_data', 'keep_files' => ['.git','.svn'], + 'gems' => [], 'timezone' => nil, # use the local timezone diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 5cad11c878d..3303f53674a 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -3,7 +3,7 @@ class Site attr_accessor :config, :layouts, :posts, :pages, :static_files, :categories, :exclude, :include, :source, :dest, :lsi, :pygments, :permalink_style, :tags, :time, :future, :safe, :plugins, :limit_posts, - :show_drafts, :keep_files, :baseurl, :data, :file_read_opts + :show_drafts, :keep_files, :baseurl, :data, :file_read_opts, :gems attr_accessor :converters, :generators @@ -13,7 +13,7 @@ class Site def initialize(config) self.config = config.clone - %w[safe lsi pygments baseurl exclude include future show_drafts limit_posts keep_files].each do |opt| + %w[safe lsi pygments baseurl exclude include future show_drafts limit_posts keep_files gems].each do |opt| self.send("#{opt}=", config[opt]) end @@ -77,6 +77,9 @@ def setup require f end end + self.gems.each do |gem| + require gem + end end self.converters = instantiate_subclasses(Jekyll::Converter) From 310688297b2333cc6e5c9e240712db6e0a1d2ffd Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 4 Oct 2013 14:32:10 -0400 Subject: [PATCH 2/3] I guess we'll wait until v2.0 to switch to absolute permalinks. --- lib/jekyll/configuration.rb | 2 +- lib/jekyll/site.rb | 2 +- site/docs/upgrading.md | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index 5e923c27e51..442fa5e6908 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -27,7 +27,7 @@ class Configuration < Hash 'pygments' => true, 'relative_permalinks' => true, # backwards-compatibility with < 1.0 - # will be set to false once 1.1 hits + # will be set to false once 2.0 hits 'markdown' => 'maruku', 'permalink' => 'date', diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 3303f53674a..3b9699d28eb 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -394,7 +394,7 @@ def aggregate_post_info(post) def relative_permalinks_deprecation_method if config['relative_permalinks'] && !@deprecated_relative_permalinks $stderr.puts # Places newline after "Generating..." - Jekyll.logger.warn "Deprecation:", "Starting in 1.1, permalinks for pages" + + Jekyll.logger.warn "Deprecation:", "Starting in 2.0, permalinks for pages" + " in subfolders must be relative to the" + " site source directory, not the parent" + " directory. Check http://jekyllrb.com/docs/upgrading/"+ diff --git a/site/docs/upgrading.md b/site/docs/upgrading.md index c15218fb363..3cf5a1ef32c 100644 --- a/site/docs/upgrading.md +++ b/site/docs/upgrading.md @@ -42,7 +42,7 @@ rebuild each time a file changes, just add the `--watch` flag at the end. ### Absolute Permalinks 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 +Until v2.0, it is **opt-in**. Starting with v2.0, however, absolute permalinks will become **opt-out**, meaning Jekyll will default to using absolute permalinks instead of relative permalinks. @@ -50,9 +50,9 @@ instead of relative permalinks. * To continue using relative permalinks, set `relative_permalinks: true` in your configuration file.