Blog Post

Render disqus options using razor does not render

Tuesday, February 2, 2016 2:07 PM

Example of rendering disqus 

 

 

 var disqus_config = function () {
this.page.url = @Html.Raw(string.Format("'{0}'", Request.Url.AbsoluteUri));
this.page.identifier = @Html.Raw(string.Format("'{0}'", Model.Id));
};
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = '//domain.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
Blog
Products
Error pages
Links and tools