Skip to content

Instantly share code, notes, and snippets.

@lfborjas
Created September 11, 2010 08:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lfborjas/574990 to your computer and use it in GitHub Desktop.
Save lfborjas/574990 to your computer and use it in GitHub Desktop.
The generic code to use disqus comments, adapted to haml
:javascript
var disqus_shortname = 'YOUR-SITE';
(function () {
var s = document.createElement('script'); s.async = true;
s.src = 'http://disqus.com/forums/YOUR-SITE/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
#disqus_thread
:javascript
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://YOUR-SITE.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
%noscript
Please enable JavaScript to view the
%a{:href=>"http://disqus.com/?ref_noscript=YOUR-SITE"} comments
powered by Disqus.
%a.dsq-brlink{:href=>"http://disqus.com"}
comments powered by
%span.logo-disqus Disqus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment