Created
June 19, 2015 00:34
-
-
Save greggnakamura/95e6325c930124b2d988 to your computer and use it in GitHub Desktop.
Jekyll: Development and Production environments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://stackoverflow.com/questions/27386169/change-site-url-to-localhost-during-jekyll-local-development | |
Let's say we have the local site served at http://localhost and the production site served at https://username.github.io/myProject. | |
We leave the _config.yml with url: https://username.github.io and baseurl: /myProject | |
We create a new _config_dev.yml with only url: https://localhost and baseurl: "" | |
Now to test locally : | |
jekyll build --config _config.yml,_config_dev.yml | |
or | |
jekyll build --config _config.yml,_config_dev.yml --watch | |
When pushed on production, the jekyll build command will use the default _config.yml. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment