Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

remove multiple config files #11

Merged
merged 1 commit into from Sep 28, 2013

Conversation

Projects
None yet
3 participants
Contributor

gnufied commented Sep 28, 2013

No description provided.

@emilsoman emilsoman added a commit that referenced this pull request Sep 28, 2013

@emilsoman emilsoman Merge pull request #11 from GardenCityRuby/remove-multiple-config
remove multiple config files
b398173

@emilsoman emilsoman merged commit b398173 into master Sep 28, 2013

Owner

emilsoman commented Sep 28, 2013

Note: The deployment script takes care of copying _config_example.yml to _config.yml

Contributor

prakashmurthy commented Sep 28, 2013

This does not help.

Without a _config.html file present, the local environment does not work. The _config.html file in the repo should be the default one that works locally (with url param not set).

Please add back the _config file, and modify the deploy script to use that or a template file for creating the _config.html for deploys/github pages.

Contributor

gnufied commented Sep 28, 2013

why would it not work? just copy _config_example.yml to _config.yml and run with it? @emilsoman is updating the instructions. Having 3 config files in repo is I think not good.

Contributor

prakashmurthy commented Sep 28, 2013

The _config.html file in the repo should be the default one that works locally (with url param not set).

Owner

emilsoman commented Sep 28, 2013

@gnufied , @prakashmurthy ,

jekyll supports building with multiple config files. See this : mojombo/jekyll#703 . Means we can have multiple config files :

  1. _config.yml - With no "url" . This is used for local development.
  2. _config_deploy.yml - Has only one line : url: http://www.gardencityruby.org
  3. _config_github.yml - Has only one line : url: http://gardencityruby.github.io/GCRC2014

I added these files and tried this locally and it works fine :

jekyll build --config _config.yml,_config_deploy.yml

I tried adding the following line to config/deploy.rb :
run "cd #{current_path} && bundle exec jekyll build --destination _deploy --config _config.yml,_config_deploy.yml"

Somehow this doesn't work. @gnufied can you see what's wrong ?

Owner

emilsoman commented Sep 29, 2013

@gnufied , @prakashmurthy , @codepodu

This is working now. We now have multiple config files, but no code duplication. _config.yml is not gitignored, use it for local development and also to make changes to configs. Other config files just override the url.

Contributor

gnufied commented Sep 29, 2013

Okay cool. Now that is working as intended. I have removed config/deploy.rb from this repo. If you guys want it, I can still add it as an example. But I can't trust external code to run on our servers. Imagine some pull request changing deploy.rb to rm -rf / or something like that. That would be disastrous. So for now, I have removed it from repo and deploy.rb is picked from another location and checksum'd before running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment