diff --git a/assets/js/disqus.js b/assets/js/disqus.js new file mode 100644 index 0000000..ed6ded8 --- /dev/null +++ b/assets/js/disqus.js @@ -0,0 +1,31 @@ +var disqus_loaded = false; + +function load_disqus() { + if (config_disqus_shortname !== '') { + disqus_loaded = true; + + // Insert Discussion title and icon + // var discussionHead = document.createElement('h3'); + // discussionHead.className = "title-disqus"; + // discussionHead.innerHTML = 'Discussion'; + // document.body.appendChild(discussionHead); + + // Insert Disqus
tags + // var disqusDiv = document.createElement('div'); + // disqusDiv.id = "disqus_thread"; + // document.body.appendChild(disqusDiv); + + // Disqus comments section code + var disqus_shortname = config_disqus_shortname; + var disqus_identifier = '{{post.id}}'; // make sure to use the post.id as an identifier, otherwise disqus will use the pages url per default, which might be problematic... + + // For embedding disqus under a post + (function() { + var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; + dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; + (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); + })(); + } +} + +load_disqus(); diff --git a/assets/js/ichi-config.js b/assets/js/ichi-config.js new file mode 100644 index 0000000..73b0a20 --- /dev/null +++ b/assets/js/ichi-config.js @@ -0,0 +1,2 @@ +// If you use DisQus comments, add your disqus shortname here +var config_disqus_shortname = ''; diff --git a/default.hbs b/default.hbs index 734c472..92d3b3e 100644 --- a/default.hbs +++ b/default.hbs @@ -16,6 +16,7 @@ + {{! Styles'n'Scripts }} diff --git a/post.hbs b/post.hbs index 7adf5c5..11949bf 100644 --- a/post.hbs +++ b/post.hbs @@ -59,21 +59,10 @@ {{/post}} -

Discussions

-
- - -comments powered by Disqus +

Discussion

+
+ +