X Tutup
Skip to content

Commit 7a0b1ed

Browse files
committed
Add new Integration points for themes
The new system will try to namespace all framework integrations with 'JB'. Integration points added in this comment are 'analytics', 'comments', and 'sharing'.
1 parent 241a512 commit 7a0b1ed

File tree

9 files changed

+85
-0
lines changed

9 files changed

+85
-0
lines changed

_includes/JB/analytics

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% if site.safe and site.JB.analytics.engine and page.JB.analytics != false %}
2+
3+
{% case site.JB.analytics.engine %}
4+
{% when "google" %}
5+
{% include JB/analytics-engines/google.html %}
6+
{% when "getclicky" %}
7+
{% include JB/analytics-engines/getclicky.html %}
8+
{% when "custom" %}
9+
{% include custom/analytics.html %}
10+
{% endcase %}
11+
12+
{% endif %}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<script type="text/javascript">
2+
var clicky_site_ids = clicky_site_ids || [];
3+
clicky_site_ids.push({{ site.JB.analytics.getclicky.site_id }});
4+
(function() {
5+
var s = document.createElement('script');
6+
s.type = 'text/javascript';
7+
s.async = true;
8+
s.src = '//static.getclicky.com/js';
9+
( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
10+
})();
11+
</script>
12+
<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/66527741ns.gif" /></p></noscript>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<script type="text/javascript">
2+
var _gaq = _gaq || [];
3+
_gaq.push(['_setAccount', '{{ site.JB.analytics.google.tracking_id }}']);
4+
_gaq.push(['_trackPageview']);
5+
6+
(function() {
7+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
8+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
9+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
10+
})();
11+
</script>

_includes/JB/comments

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{% if site.JB.comments.engine and page.JB.comments != false %}
2+
3+
{% case site.JB.comments.engine %}
4+
{% when "disqus" %}
5+
{% include JB/comments-engines/disqus.html %}
6+
{% when "livefyre" %}
7+
{% include JB/comments-engines/livefyre.html %}
8+
{% when "intensedebate" %}
9+
{% include JB/comments-engines/intensedebate.html %}
10+
{% when "facebook" %}
11+
{% include JB/comments-engines/facebook.html %}
12+
{% when "custom" %}
13+
{% include custom/comments.html %}
14+
{% endcase %}
15+
16+
{% endif %}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div id="disqus_thread"></div>
2+
<script type="text/javascript">
3+
{% if site.safe == false %}var disqus_developer = 1;{% endif %}
4+
var disqus_shortname = '{{ site.JB.comments.disqus.short_name }}'; // required: replace example with your forum shortname
5+
/* * * DON'T EDIT BELOW THIS LINE * * */
6+
(function() {
7+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
8+
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
9+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
10+
})();
11+
</script>
12+
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
13+
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h3>Facebook comments TODO!</h3>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<script>
2+
var idcomments_acct = '{{ site.JB.comments.intensedebate.account }}';
3+
var idcomments_post_id;
4+
var idcomments_post_url;
5+
</script>
6+
<script type="text/javascript" src="http://www.intensedebate.com/js/genericLinkWrapperV2.js"></script>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<script type='text/javascript' src='http://zor.livefyre.com/wjs/v1.0/javascripts/livefyre_init.js'></script>
2+
<script type='text/javascript'>
3+
var fyre = LF({
4+
site_id: {{ site.JB.comments.livefyre.site_id }}
5+
});
6+
</script>

_includes/JB/sharing

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% if site.safe and site.JB.sharing.engine and page.JB.sharing != false %}
2+
3+
{% case site.JB.sharing.engine %}
4+
{% when "custom" %}
5+
{% include custom/sharing.html %}
6+
{% endcase %}
7+
8+
{% endif %}

0 commit comments

Comments
 (0)
X Tutup