Skip to content
Hilmar Lapp edited this page Jan 11, 2017 · 6 revisions

Events:

Serving the site locally

It's useful to serve the site locally when developing content. One way to do that is obviously to install Jekyll locally with all its dependencies. To ensure the site renders correctly, ensure to override the site URL:

$ jekyll serve --config _config.yml,_config-dev.yml

You can also render and serve the site using Docker, which avoids having to install Jekyll and its dependencies:

$ docker pull jekyll/jekyll
$ docker run --volume=$(pwd):/srv/jekyll -it -p 127.0.0.1:4000:4000 jekyll/jekyll jekyll serve --config _config.yml,_config-dev.yml

The Makefile implements both commands, so you can also just say this:

# serves site locally using a locally installed jekyll build
$ make serve

Or this:

# serves site locally using a Docker container, do Docker must be installed
$ make serve-docker