Merge pull request #261 from plusjade/revert-260-jb-issue-84
Revert "Site.Safe Replacement for Detecting Production Environment"
This commit is contained in:
commit
bc63f77c00
6 changed files with 4 additions and 52 deletions
|
@ -1,6 +1,4 @@
|
||||||
{% include JB/is_production %}
|
{% if site.safe and site.JB.analytics.provider and page.JB.analytics != false %}
|
||||||
|
|
||||||
{% if is_production and site.JB.analytics.provider and page.JB.analytics != false %}
|
|
||||||
|
|
||||||
{% case site.JB.analytics.provider %}
|
{% case site.JB.analytics.provider %}
|
||||||
{% when "google" %}
|
{% when "google" %}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<div id="disqus_thread"></div>
|
<div id="disqus_thread"></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
{% include JB/is_production %}
|
{% if site.safe == false %}var disqus_developer = 1;{% endif %}
|
||||||
{% 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
|
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 %}
|
{% if page.wordpress_id %}var disqus_identifier = '{{page.wordpress_id}} {{site.production_url}}/?p={{page.wordpress_id}}';{% endif %}
|
||||||
/* * * DON'T EDIT BELOW THIS LINE * * */
|
/* * * 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 %}
|
|
|
@ -2,11 +2,10 @@
|
||||||
<!--
|
<!--
|
||||||
- Dynamically set liquid variables for working with URLs/paths
|
- Dynamically set liquid variables for working with URLs/paths
|
||||||
-->
|
-->
|
||||||
{% include JB/is_production %}
|
|
||||||
{% if site.JB.setup.provider == "custom" %}
|
{% if site.JB.setup.provider == "custom" %}
|
||||||
{% include custom/setup %}
|
{% include custom/setup %}
|
||||||
{% else %}
|
{% 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 BASE_PATH = site.JB.BASE_PATH %}
|
||||||
{% assign HOME_PATH = site.JB.BASE_PATH %}
|
{% assign HOME_PATH = site.JB.BASE_PATH %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{% include JB/is_production %}
|
{% if site.safe and site.JB.sharing.provider and page.JB.sharing != false %}
|
||||||
{% if is_production and site.JB.sharing.provider and page.JB.sharing != false %}
|
|
||||||
|
|
||||||
{% case site.JB.sharing.provider %}
|
{% case site.JB.sharing.provider %}
|
||||||
{% when "custom" %}
|
{% when "custom" %}
|
||||||
|
|
4
index.md
4
index.md
|
@ -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)!
|
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.
|
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}}".
|
|
Loading…
Add table
Reference in a new issue