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'.
This commit is contained in:
parent
241a512053
commit
7a0b1ed689
9 changed files with 85 additions and 0 deletions
12
_includes/JB/analytics
Normal file
12
_includes/JB/analytics
Normal file
|
@ -0,0 +1,12 @@
|
|||
{% if site.safe and site.JB.analytics.engine and page.JB.analytics != false %}
|
||||
|
||||
{% case site.JB.analytics.engine %}
|
||||
{% when "google" %}
|
||||
{% include JB/analytics-engines/google.html %}
|
||||
{% when "getclicky" %}
|
||||
{% include JB/analytics-engines/getclicky.html %}
|
||||
{% when "custom" %}
|
||||
{% include custom/analytics.html %}
|
||||
{% endcase %}
|
||||
|
||||
{% endif %}
|
12
_includes/JB/analytics-engines/getclicky.html
Normal file
12
_includes/JB/analytics-engines/getclicky.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<script type="text/javascript">
|
||||
var clicky_site_ids = clicky_site_ids || [];
|
||||
clicky_site_ids.push({{ site.JB.analytics.getclicky.site_id }});
|
||||
(function() {
|
||||
var s = document.createElement('script');
|
||||
s.type = 'text/javascript';
|
||||
s.async = true;
|
||||
s.src = '//static.getclicky.com/js';
|
||||
( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
|
||||
})();
|
||||
</script>
|
||||
<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/66527741ns.gif" /></p></noscript>
|
11
_includes/JB/analytics-engines/google.html
Normal file
11
_includes/JB/analytics-engines/google.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', '{{ site.JB.analytics.google.tracking_id }}']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
16
_includes/JB/comments
Normal file
16
_includes/JB/comments
Normal file
|
@ -0,0 +1,16 @@
|
|||
{% if site.JB.comments.engine and page.JB.comments != false %}
|
||||
|
||||
{% case site.JB.comments.engine %}
|
||||
{% when "disqus" %}
|
||||
{% include JB/comments-engines/disqus.html %}
|
||||
{% when "livefyre" %}
|
||||
{% include JB/comments-engines/livefyre.html %}
|
||||
{% when "intensedebate" %}
|
||||
{% include JB/comments-engines/intensedebate.html %}
|
||||
{% when "facebook" %}
|
||||
{% include JB/comments-engines/facebook.html %}
|
||||
{% when "custom" %}
|
||||
{% include custom/comments.html %}
|
||||
{% endcase %}
|
||||
|
||||
{% endif %}
|
13
_includes/JB/comments-engines/disqus.html
Normal file
13
_includes/JB/comments-engines/disqus.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
{% 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
|
||||
/* * * DON'T EDIT BELOW THIS LINE * * */
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
|
1
_includes/JB/comments-engines/facebook.html
Normal file
1
_includes/JB/comments-engines/facebook.html
Normal file
|
@ -0,0 +1 @@
|
|||
<h3>Facebook comments TODO!</h3>
|
6
_includes/JB/comments-engines/intensedebate.html
Normal file
6
_includes/JB/comments-engines/intensedebate.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
<script>
|
||||
var idcomments_acct = '{{ site.JB.comments.intensedebate.account }}';
|
||||
var idcomments_post_id;
|
||||
var idcomments_post_url;
|
||||
</script>
|
||||
<script type="text/javascript" src="http://www.intensedebate.com/js/genericLinkWrapperV2.js"></script>
|
6
_includes/JB/comments-engines/livfyre.html
Normal file
6
_includes/JB/comments-engines/livfyre.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
<script type='text/javascript' src='http://zor.livefyre.com/wjs/v1.0/javascripts/livefyre_init.js'></script>
|
||||
<script type='text/javascript'>
|
||||
var fyre = LF({
|
||||
site_id: {{ site.JB.comments.livefyre.site_id }}
|
||||
});
|
||||
</script>
|
8
_includes/JB/sharing
Normal file
8
_includes/JB/sharing
Normal file
|
@ -0,0 +1,8 @@
|
|||
{% if site.safe and site.JB.sharing.engine and page.JB.sharing != false %}
|
||||
|
||||
{% case site.JB.sharing.engine %}
|
||||
{% when "custom" %}
|
||||
{% include custom/sharing.html %}
|
||||
{% endcase %}
|
||||
|
||||
{% endif %}
|
Loading…
Add table
Reference in a new issue