blob: eb5f91623373827dae529f1012293ae8f73560a3 [file] [log] [blame]
{% capture jbcache %}{% comment %}
Determine whether or not the site is being built in a production environment.
Parameters:
None.
Returns:
is_production: [true|false]
jb_prod_env: [development|github|other]
Examples:
{% include JB/is_production %}
{% if is_production != true %}
<h3>This is Private</h3>
<p>I love to watch television in my undies. Don't tell anyone!</p>
{% endif %}
<h3>This is Public</h3>
<p>I have no unusual quirks.</p>
{% endcomment %}
{% assign is_production = false %}
{% assign jb_prod_env = "development" %}
{% if jekyll.environment != "development" %}
{% assign is_production = true %}
{% assign jb_prod_env = jekyll.environment %}
{% endif %}
{% if site.github %}
{% assign is_production = true %}
{% assign jb_prod_env = "github" %}
{% endif %}
{% if site.safe %}
{% assign is_production = true %}
{% endif %}
{% endcapture %}{% assign jbcache = nil %}