parent
e0335e2167
commit
e531925cae
|
@ -46,7 +46,7 @@ command :build do |c|
|
||||||
c.syntax = 'jekyll build [options]'
|
c.syntax = 'jekyll build [options]'
|
||||||
c.description = 'Build your site'
|
c.description = 'Build your site'
|
||||||
|
|
||||||
c.option '--config [CONFIG_FILE]', Array, 'Custom configuration file'
|
c.option '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
|
||||||
c.option '--future', 'Publishes posts with a future date'
|
c.option '--future', 'Publishes posts with a future date'
|
||||||
c.option '--limit_posts MAX_POSTS', 'Limits the number of posts to parse and publish'
|
c.option '--limit_posts MAX_POSTS', 'Limits the number of posts to parse and publish'
|
||||||
c.option '-w', '--watch', 'Watch for changes and rebuild'
|
c.option '-w', '--watch', 'Watch for changes and rebuild'
|
||||||
|
@ -54,7 +54,6 @@ command :build do |c|
|
||||||
c.option '--drafts', 'Render posts in the _drafts folder'
|
c.option '--drafts', 'Render posts in the _drafts folder'
|
||||||
|
|
||||||
c.action do |args, options|
|
c.action do |args, options|
|
||||||
options.defaults :serving => false
|
|
||||||
options = normalize_options(options.__hash__)
|
options = normalize_options(options.__hash__)
|
||||||
options = Jekyll.configuration(options)
|
options = Jekyll.configuration(options)
|
||||||
Jekyll::Commands::Build.process(options)
|
Jekyll::Commands::Build.process(options)
|
||||||
|
@ -65,7 +64,7 @@ command :serve do |c|
|
||||||
c.syntax = 'jekyll serve [options]'
|
c.syntax = 'jekyll serve [options]'
|
||||||
c.description = 'Serve your site locally'
|
c.description = 'Serve your site locally'
|
||||||
|
|
||||||
c.option '--config [CONFIG_FILE]', Array,'Custom configuration file'
|
c.option '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
|
||||||
c.option '--future', 'Publishes posts with a future date'
|
c.option '--future', 'Publishes posts with a future date'
|
||||||
c.option '--limit_posts MAX_POSTS', 'Limits the number of posts to parse and publish'
|
c.option '--limit_posts MAX_POSTS', 'Limits the number of posts to parse and publish'
|
||||||
c.option '-w', '--watch', 'Watch for changes and rebuild'
|
c.option '-w', '--watch', 'Watch for changes and rebuild'
|
||||||
|
|
|
@ -106,7 +106,7 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns this configuration, overridden by the values in the file
|
# Returns this configuration, overridden by the values in the file
|
||||||
def read_config_file(file)
|
def read_config_file(file)
|
||||||
configuration = dup
|
configuration = clone
|
||||||
next_config = YAML.safe_load_file(file)
|
next_config = YAML.safe_load_file(file)
|
||||||
raise "Configuration file: (INVALID) #{file}".yellow if !next_config.is_a?(Hash)
|
raise "Configuration file: (INVALID) #{file}".yellow if !next_config.is_a?(Hash)
|
||||||
Jekyll::Logger.info "Configuration file:", file
|
Jekyll::Logger.info "Configuration file:", file
|
||||||
|
@ -120,7 +120,7 @@ module Jekyll
|
||||||
# Returns the full configuration, with the defaults overridden by the values in the
|
# Returns the full configuration, with the defaults overridden by the values in the
|
||||||
# configuration files
|
# configuration files
|
||||||
def read_config_files(files)
|
def read_config_files(files)
|
||||||
configuration = dup
|
configuration = clone
|
||||||
|
|
||||||
begin
|
begin
|
||||||
files.each do |config_file|
|
files.each do |config_file|
|
||||||
|
@ -143,7 +143,7 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns the backwards-compatible configuration
|
# Returns the backwards-compatible configuration
|
||||||
def backwards_compatibilize
|
def backwards_compatibilize
|
||||||
config = dup
|
config = clone
|
||||||
# Provide backwards-compatibility
|
# Provide backwards-compatibility
|
||||||
if config.has_key? 'auto'
|
if config.has_key? 'auto'
|
||||||
Jekyll::Logger.warn "Deprecation:", "'auto' has been changed to " +
|
Jekyll::Logger.warn "Deprecation:", "'auto' has been changed to " +
|
||||||
|
|
Loading…
Reference in New Issue