Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

adding disqus comments

  • Loading branch information...
commit 0431fb006ec610532ea78b925ea18fd71c7c33fc 1 parent d85782f
Youssef Chaker authored
Showing with 29 additions and 0 deletions.
  1. +17 −0 _layouts/default.html
  2. +12 −0 _layouts/post.html
View
17 _layouts/default.html
@@ -26,6 +26,7 @@
</div>
+ <!-- Google Analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
@@ -36,5 +37,21 @@
pageTracker._setDomainName(".whichrubycmsshouldiuse.com");
pageTracker._trackPageview();
} catch(err) {}</script>
+
+ <!-- Disqus Comments -->
+ <script type="text/javascript">
+ //<![CDATA[
+ (function() {
+ var links = document.getElementsByTagName('a');
+ var query = '?';
+ for(var i = 0; i < links.length; i++) {
+ if(links[i].href.indexOf('#disqus_thread') >= 0) {
+ query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
+ }
+ }
+ document.write('<script charset="utf-8" type="text/javascript" src="http://disqus.com/forums/whichrubycmsshouldiuser/get_num_replies.js' + query + '"></' + 'script>');
+ })();
+ //]]>
+ </script>
</body>
</html>
View
12 _layouts/post.html
@@ -8,6 +8,18 @@
<p class="meta">
<span class="date">{{ page.date | date: '%a, %d %b %Y' }}</span>
</p>
+
+ <p class="comments">
+ Post comments: <a href='{{ post.url }}#disqus_thread'>View Comments</a>
+ </p>
{{ content }}
+
+ <hr />
+</div>
+
+
+<div id="comments">
+ <div id="disqus_thread"></div>
+ <script type="text/javascript" src="http://disqus.com/forums/whichrubycmsshouldiuser/embed.js"></script><noscript><a href="http://disqus.com/forums/whichrubycmsshouldiuser/?url=ref">View the discussion thread.</a></noscript><a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.