Permalink
Browse files

adding disqus comments

  • Loading branch information...
Youssef Chaker
Youssef Chaker committed Jan 7, 2010
1 parent d85782f commit 0431fb006ec610532ea78b925ea18fd71c7c33fc
Showing with 29 additions and 0 deletions.
  1. +17 −0 _layouts/default.html
  2. +12 −0 _layouts/post.html
View
@@ -26,6 +26,7 @@ <h1><a href='/' title='Which Ruby CMS Should I Use?'>Which Ruby CMS Should I Use
</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 @@ <h1><a href='/' title='Which Ruby CMS Should I Use?'>Which Ruby CMS Should I Use
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
@@ -8,6 +8,18 @@ <h2>{{ page.title }}</h2>
<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>

0 comments on commit 0431fb0

Please sign in to comment.