Last active
August 29, 2015 14:14
-
-
Save craigsapp/428ef65e9a355d6568ef to your computer and use it in GitHub Desktop.
View local copy of Jekyll website.
This file contains 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
To locally view a jekyll website, type this in the base directory of the website repository: | |
jekyll server --watch --host 127.0.0.1 --port 4000 | |
Then to view the website, go to this address: | |
http://127.0.0.1:4000 | |
If you change files on the website, the --watch option will recompile | |
the website without the need to restart the local jekyll server. | |
The compiled website will be placed in a directory called _site. Add | |
this directory to the .gitignore file so that it is not accidentally | |
added to the repository. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jekyll sometimes sets the host to 0.0.0.0 by default, but Chrome will not allow this address. So giving --host 127.0.0.1 as an option will ensure that it is useable in Chrome.