Skip to content

Instantly share code, notes, and snippets.

@gsmcwhirter
Created December 14, 2011 20:51
Show Gist options
  • Save gsmcwhirter/1478455 to your computer and use it in GitHub Desktop.
Save gsmcwhirter/1478455 to your computer and use it in GitHub Desktop.
<script type="text/x-handlebars" data-template-name="blog-post">
{{view Blog.EditFormView contentBinding="content" classBinding="content.isEditing:editing-form"}}
{{view Blog.PostDisplayView contentBinding="content" classBinding="content.isEditing:editing-display"}}
{{#if showComments}}
<div id="disqus_thread"></div>
{{#view contentBinding="content" tagName="script" type="text/javascript"}}
var disqus_shortname = 'ideafreemonoid';
var disqus_identifier = '{{content.slug}}';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
{{/view}}
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by
<span class="logo-disqus">Disqus</span></a>
{{/if}}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment