I\'d like to add the following line to my head.html
solely when running jekyll serve
locally:
When you do a jekyll serve
locally the default {{ jekyll.environment }}
variable is set to "development"
.
You can then do a simple :
{% if jekyll.environment == "development" %}
{% endif %}
If you want to run jekyll on another server, with another environment
value, you can set a JEKYLL_ENV
system environment variable to whatever you want.
Setting this variable at runtime can be done like this :
JEKYLL_ENV=production jekyll serve
Note : On Github Pages, jekyll.environment
is set to production
.