Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added custom config file

  • Loading branch information...
commit c061b75a911429adcfd2f2bb0f123e5cf0bbea9e 1 parent 72b7b1f
Stefan Liebenberg authored
Showing with 5 additions and 1 deletion.
  1. +4 −0 bin/jekyll
  2. +1 −1  lib/jekyll.rb
4 bin/jekyll
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
2  lib/jekyll.rb
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)
Please sign in to comment.
Something went wrong with that request. Please try again.