From efb74d7e478813e268f7360de6b4cb6c34c4793e Mon Sep 17 00:00:00 2001 From: Ariejan de Vroom Date: Sun, 24 Mar 2013 16:44:51 +0100 Subject: [PATCH] Add Disqus --- layouts/post.haml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/layouts/post.haml b/layouts/post.haml index 888fabb..fa6a8b8 100644 --- a/layouts/post.haml +++ b/layouts/post.haml @@ -5,6 +5,9 @@ %section#content %article = yield + + #disqus_thread + %section#sidebar %aside.widget.widget_metadata %h3.widgettitle About this post @@ -12,3 +15,11 @@ This post was written by Ariejan de Vroom on #{get_pretty_date(item)} and tagged with #{get_tags(item)}. + +:javascript + var disqus_url = "#{url_for(item)}"; + (function() { + var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; + dsq.src = 'http://ariejannet.disqus.com/embed.js'; + (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); + })(); \ No newline at end of file