Development and production settings for Jekyll

tags:

As I installed Google Analytics, I wanted to keep it from tracking pages on my local development web server. I found this neat solution by David Elbe, which lets med keep development stuff apart from production stuff. On GitHub Pages, jekyll.environment is always set to production.

{% if jekyll.environment == 'production' %}
/* Production stuff */
{% else %}
/* Development stuff */
{% endif %}
If you liked this post, you can share it with your followers or follow me on Twitter!