Public | Automated Build

Last pushed: 2 years ago
Short Description
Jekyll plus livereload, guard, and jekyll-feed for atom feeds
Full Description

Jekyll plus livereload

The build will run jekyll plus guard with guard-livereload plugins. Version 0.2 adds jekyll-feed gem to automatically make an atom.xml or feed.xml file. Want more gems/plugins? Open an issue and ask.

Run jekyll server with live reload

docker run --rm -v "$PWD:/src" \
  -p 4000:4000 \
  -p 35729:35729 \
  markkimsal/jekyll-plus

This will default to running jekyll serve -H 0.0.0.0 via the init process of the container.

Add the following JS to your html files:

<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>

Run Jekyll build one time

To make a one time build and use jekyll without the livereload

docker run --rm  -v "$PWD:/src" \
   markkimsal/jekyll-plus  jekyll build

You can customize the output folder which defaults to /src/_site/ by binding another volume

docker run --rm  -v "$PWD:/src" \
  -v "$PWD/../../my\_static\_build/folder/:/src/\_site/" 
  markkimsal/jekyll-plus  jekyll build

Run Jekyll build with alternate config

You may want to have a separate config file that contains a flag for your production environment. Something like:

//_config_prod.yml
prod: true

so you can disable things like JS tracking and live reload in your dev environment:

{% unless site.prod %}                                                                                                                                                                  
    <script> document.write('<script src="//' + (location.hostname || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>                           
{% endunless %} 

You can run a one time build with an alternate config file like this:

docker run --rm  -v "$PWD:/src" \
  markkimsal/jekyll-plus  jekyll build  --config _config_prod.yml

Run Jekyll build with JEKYLL_ENV

You may want to run a production build and set the jekyll.environment flag to production. This will allow you to check this flag in Liquid syntax which defaults to "development" if you don't specify a setting from command line

{% if jekyll.environment == "production" %}
    {% include disqus.html %}
{% endif %}

You can run a one time build and specify the jekyll.environment flag with this:

docker run --rm  -v "$PWD:/src" \
  -e JEKYLL_ENV=production \
  markkimsal/jekyll-plus  jekyll build
Docker Pull Command
Owner
markkimsal
Source Repository

Comments (0)