Since I often find myself working on a Windows machine, it would be quite troublesome to run a dedicated ruby environment for Jekyll and its dependencies. That’s why when editing my blog I’m happy to use the official Jekyll docker build.

Pull the container:

docker pull jekyll/jekyll:pages

Run it with a mount to your local blog:

docker run --rm --volume=/local/blog:/srv/jekyll -it -p 4000:4000 jekyll/jekyll:pages

Run it with automatic file updates:

docker run --rm --volume=/local/blog:/srv/jekyll -it -p 4000:4000 jekyll/jekyll:pages jekyll serve --incremental --watch --force_polling

Note: transitive changes, e.g. posts by tag or posts by category, are not affected.