Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

adds a --config [PATH] option to the command line options #393

Closed
wants to merge 1 commit into from
@StefanLiebenberg

#150

I needed this change, sharing it if other users would need it too.

@ndbroadbent

+1, I also needed this. Gives a lot more flexibility while developing

@tobi

Please merge this.

@lekevicius

+1

Would have written it myself and requested if it weren't written yet. Please merge, it allows to have unified codebase for multiple sites with different configurations.

@tobi

Same here, we run www.shopify.com from a fork that has this merged. We keep _config.yml with the project but also have _config.live.yml which enables things like asset compression and performs some other tasks that are not needed in development environment.

@useware

+1

I'm developing a website using local, test and live servers. They all have a bunch of different settings so this would be very useful.

@jgarber623

+1 to this as well. It would be a very helpful addition.

@masnick

+1

@parkr parkr referenced this pull request
Closed

Accept custom configs #725

@parkr
Owner

Enhanced & with tests in #725. Closing in favour of that.

@parkr parkr closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 30, 2011
  1. @StefanLiebenberg
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 1 deletion.
  1. +4 −0 bin/jekyll
  2. +1 −1  lib/jekyll.rb
View
4 bin/jekyll
@@ -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
2  lib/jekyll.rb
@@ -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)
Something went wrong with that request. Please try again.