diff --git a/lib/jekyll/command.rb b/lib/jekyll/command.rb index 957e9825..62a532f6 100644 --- a/lib/jekyll/command.rb +++ b/lib/jekyll/command.rb @@ -70,6 +70,7 @@ module Jekyll c.option 'force_polling', '--force_polling', 'Force watch to use polling' c.option 'lsi', '--lsi', 'Use LSI for improved related posts' c.option 'show_drafts', '-D', '--drafts', 'Render posts in the _drafts folder' + c.option 'unpublished', '--unpublished', 'Render posts that were marked as unpublished' c.option 'quiet', '-q', '--quiet', 'Silence output.' c.option 'verbose', '-V', '--verbose', 'Print verbose output.' end diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index 091bebc4..93dc5193 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -24,6 +24,7 @@ module Jekyll 'limit_posts' => 0, 'lsi' => false, 'future' => true, # remove and make true just default + 'unpublished' => false, 'relative_permalinks' => true, # backwards-compatibility with < 1.0 # will be set to false once 2.0 hits diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 8497dd10..60093e8f 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -2,7 +2,7 @@ module Jekyll class Site attr_accessor :config, :layouts, :posts, :pages, :static_files, :exclude, :include, :source, :dest, :lsi, :highlighter, - :permalink_style, :time, :future, :safe, :plugins, :limit_posts, + :permalink_style, :time, :future, :unpublished, :safe, :plugins, :limit_posts, :show_drafts, :keep_files, :baseurl, :data, :file_read_opts, :gems, :plugin_manager @@ -14,7 +14,7 @@ module Jekyll def initialize(config) self.config = config.clone - %w[safe lsi highlighter baseurl exclude include future show_drafts limit_posts keep_files gems].each do |opt| + %w[safe lsi highlighter baseurl exclude include future unpublished show_drafts limit_posts keep_files gems].each do |opt| self.send("#{opt}=", config[opt]) end