Commit 45bf884 1 parent 9647ba4 commit 45bf884 Copy full SHA for 45bf884
File tree 5 files changed +48
-4
lines changed
5 files changed +48
-4
lines changed Original file line number Diff line number Diff line change 1
- {% if site.safe and site.JB.analytics.provider and page.JB.analytics != false %}
1
+ {% include JB/is_production %}
2
+
3
+ {% if is_production and site.JB.analytics.provider and page.JB.analytics != false %}
2
4
3
5
{% case site.JB.analytics.provider %}
4
6
{% when "google_classic" %}
Original file line number Diff line number Diff line change 1
1
<div id="disqus_thread"></div>
2
2
<script type="text/javascript">
3
- {% if site.safe == false %}var disqus_developer = 1;{% endif %}
3
+ {% include JB/is_production %}
4
+ {% if is_production == false %}var disqus_developer = 1;{% endif %}
4
5
var disqus_shortname = '{{ site.JB.comments.disqus.short_name }}'; // required: replace example with your forum shortname
5
6
{% if page.wordpress_id %}var disqus_identifier = '{{page.wordpress_id}} {{site.production_url}}/?p={{page.wordpress_id}}';{% endif %}
6
7
/* * * DON'T EDIT BELOW THIS LINE * * */
Original file line number Diff line number Diff line change
1
+ {% capture jbcache %}{% comment %}
2
+
3
+ Determine whether or not the site is being built in a production environment.
4
+
5
+ Parameters:
6
+ None.
7
+
8
+ Returns:
9
+ is_production: [true|false]
10
+ jb_prod_env: [development|github|other]
11
+
12
+ Examples:
13
+
14
+ {% include JB/is_production %}
15
+
16
+ {% if is_production != true %}
17
+ <h3>This is Private</h3>
18
+ <p>I love to watch television in my undies. Don't tell anyone!</p>
19
+ {% endif %}
20
+
21
+ <h3>This is Public</h3>
22
+ <p>I have no unusual quirks.</p>
23
+
24
+ {% endcomment %}
25
+
26
+ {% assign is_production = false %}
27
+ {% assign jb_prod_env = "development" %}
28
+
29
+ {% if jekyll.environment != "development" %}
30
+ {% assign is_production = true %}
31
+ {% assign jb_prod_env = jekyll.environment %}
32
+ {% endif %}
33
+
34
+ {% if site.github %}
35
+ {% assign is_production = true %}
36
+ {% assign jb_prod_env = "github" %}
37
+ {% endif %}
38
+
39
+ {% endcapture %}{% assign jbcache = nil %}
Original file line number Diff line number Diff line change 2
2
<!--
3
3
- Dynamically set liquid variables for working with URLs/paths
4
4
-->
5
+ {% include JB/is_production %}
5
6
{% if site.JB.setup.provider == "custom" %}
6
7
{% include custom/setup %}
7
8
{% else %}
8
- {% if site.safe and site.JB.BASE_PATH and site.JB.BASE_PATH != '' %}
9
+ {% if is_production and site.JB.BASE_PATH and site.JB.BASE_PATH != '' %}
9
10
{% assign BASE_PATH = site.JB.BASE_PATH %}
10
11
{% assign HOME_PATH = site.JB.BASE_PATH %}
11
12
{% else %}
Original file line number Diff line number Diff line change 1
- {% if site.safe and site.JB.sharing.provider and page.JB.sharing != false %}
1
+ {% include JB/is_production %}
2
+ {% if is_production and site.JB.sharing.provider and page.JB.sharing != false %}
2
3
3
4
{% case site.JB.sharing.provider %}
4
5
{% when "custom" %}
You can’t perform that action at this time.
0 commit comments