Permalink
Browse files

added custom config file

  • Loading branch information...
1 parent 72b7b1f commit c061b75a911429adcfd2f2bb0f123e5cf0bbea9e @StefanLiebenberg StefanLiebenberg committed Aug 30, 2011
Showing with 5 additions and 1 deletion.
  1. +4 −0 bin/jekyll
  2. +1 −1 lib/jekyll.rb
View
@@ -25,6 +25,10 @@ options = {}
opts = OptionParser.new do |opts|
opts.banner = help
+ opts.on("--config [PATH]", "custom configuration file" ) do |config_file|
+ options['config'] = config_file
+ end
+
opts.on("--file [PATH]", "File to import from") do |import_file|
options['file'] = import_file
end
View
@@ -114,7 +114,7 @@ def self.configuration(override)
source = override['source'] || Jekyll::DEFAULTS['source']
# Get configuration from <source>/_config.yml
- config_file = File.join(source, '_config.yml')
+ config_file = override['config'] || File.join(source, '_config.yml')
begin
config = YAML.load_file(config_file)
raise "Invalid configuration - #{config_file}" if !config.is_a?(Hash)

0 comments on commit c061b75

Please sign in to comment.