Fixes issue #84.

This commit is contained in:
groundh0g 2015-03-31 23:48:52 -04:00
parent 3481cfab6a
commit 35876ce06a
5 changed files with 48 additions and 4 deletions

View file

@ -1,4 +1,6 @@
{% if site.safe and site.JB.analytics.provider and page.JB.analytics != false %}
{% include JB/is_production %}
{% if is_production and site.JB.analytics.provider and page.JB.analytics != false %}
{% case site.JB.analytics.provider %}
{% when "google" %}

View file

@ -1,6 +1,7 @@
<div id="disqus_thread"></div>
<script type="text/javascript">
{% if site.safe == false %}var disqus_developer = 1;{% endif %}
{% include JB/is_production %}
{% if is_production == false %}var disqus_developer = 1;{% endif %}
var disqus_shortname = '{{ site.JB.comments.disqus.short_name }}'; // required: replace example with your forum shortname
{% if page.wordpress_id %}var disqus_identifier = '{{page.wordpress_id}} {{site.production_url}}/?p={{page.wordpress_id}}';{% endif %}
/* * * DON'T EDIT BELOW THIS LINE * * */

View file

@ -0,0 +1,39 @@
{% 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 %}
{% endcapture %}{% assign jbcache = nil %}

View file

@ -2,10 +2,11 @@
<!--
- Dynamically set liquid variables for working with URLs/paths
-->
{% include JB/is_production %}
{% if site.JB.setup.provider == "custom" %}
{% include custom/setup %}
{% else %}
{% if site.safe and site.JB.BASE_PATH and site.JB.BASE_PATH != '' %}
{% if is_production and site.JB.BASE_PATH and site.JB.BASE_PATH != '' %}
{% assign BASE_PATH = site.JB.BASE_PATH %}
{% assign HOME_PATH = site.JB.BASE_PATH %}
{% else %}

View file

@ -1,4 +1,5 @@
{% if site.safe and site.JB.sharing.provider and page.JB.sharing != false %}
{% include JB/is_production %}
{% if is_production and site.JB.sharing.provider and page.JB.sharing != false %}
{% case site.JB.sharing.provider %}
{% when "custom" %}