Skip to content

Instantly share code, notes, and snippets.

@craigsapp
Last active August 29, 2015 14:14
Show Gist options
  • Save craigsapp/428ef65e9a355d6568ef to your computer and use it in GitHub Desktop.
Save craigsapp/428ef65e9a355d6568ef to your computer and use it in GitHub Desktop.
View local copy of Jekyll website.
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.
@craigsapp
Copy link
Author

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.

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