Merge pull request #261 from plusjade/revert-260-jb-issue-84

Revert "Site.Safe Replacement for Detecting Production Environment"
This commit is contained in:
Joseph Hall (groundh0g) 2015-03-31 23:09:35 -04:00
commit bc63f77c00
6 changed files with 4 additions and 52 deletions

View file

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

View file

@ -1,7 +1,6 @@
<div id="disqus_thread"></div>
<script type="text/javascript">
{% include JB/is_production %}
{% if is_production == false %}var disqus_developer = 1;{% endif %}
{% if site.safe == 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

@ -1,39 +0,0 @@
{% 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,11 +2,10 @@
<!--
- Dynamically set liquid variables for working with URLs/paths
-->
{% include JB/is_production %}
{% if site.JB.setup.provider == "custom" %}
{% include custom/setup %}
{% else %}
{% if is_production and site.JB.BASE_PATH and site.JB.BASE_PATH != '' %}
{% if site.safe 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,5 +1,4 @@
{% include JB/is_production %}
{% if is_production and site.JB.sharing.provider and page.JB.sharing != false %}
{% if site.safe and site.JB.sharing.provider and page.JB.sharing != false %}
{% case site.JB.sharing.provider %}
{% when "custom" %}

View file

@ -43,8 +43,4 @@ Here's a sample "posts list".
This theme is still unfinished. If you'd like to be added as a contributor, [please fork](http://github.com/plusjade/jekyll-bootstrap)!
We need to clean up the themes, make theme usage guides with theme-specific markup examples.
{% include JB/is_production %}
## Production Mode?
This site is {% if is_production != true %}not{% endif %} running in production mode. The environment is "{{jb_prod_env}}".