Permalink
Browse files

Revert "Site.Safe Replacement for Detecting Production Environment"

  • Loading branch information...
1 parent 7a04f0b commit ff3bc1defafadb7ad69ebdebca99a1798590ed21 @groundh0g groundh0g committed Apr 1, 2015
Showing with 4 additions and 52 deletions.
  1. +1 −3 _includes/JB/analytics
  2. +1 −2 _includes/JB/comments-providers/disqus
  3. +0 −39 _includes/JB/is_production
  4. +1 −2 _includes/JB/setup
  5. +1 −2 _includes/JB/sharing
  6. +0 −4 index.md
@@ -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" %}
@@ -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 * * */
@@ -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
@@ -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 %}
@@ -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
@@ -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}}".

0 comments on commit ff3bc1d

Please sign in to comment.