Skip to content

Commit

Permalink
add docker-serve make target for #238
Browse files Browse the repository at this point in the history
If Docker is installed, `make docker-serve` will download and start a
Jekyll container to build and serve the site with hot reloading.

JEKYLL_VERSION should be synced with https://pages.github.com/versions/
  • Loading branch information
alee committed May 8, 2018
1 parent 9ccbb18 commit 7ccdf49
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Settings
MAKEFILES=Makefile $(wildcard *.mk)
JEKYLL=jekyll
JEKYLL_VERSION=3.7.3
PARSER=bin/markdown_ast.rb
DST=_site

Expand All @@ -16,6 +17,10 @@ all : commands
commands :
@grep -h -E '^##' ${MAKEFILES} | sed -e 's/## //g'

## docker-serve : use docker to build the site
docker-serve :
docker run --rm -it -v ${PWD}:/srv/jekyll -p 127.0.0.1:4000:4000 jekyll/jekyll:${JEKYLL_VERSION} make serve

## serve : run a local server.
serve : lesson-md
${JEKYLL} serve
Expand Down

0 comments on commit 7ccdf49

Please sign in to comment.