Skip to content

Instantly share code, notes, and snippets.

@piotrpog piotrpog/disqus.twig
Created May 17, 2019

Embed
What would you like to do?
{% set shortname = 'YOUR_WEBSITE_SHORTNAME' %}
{% if entry is defined %}
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = '{{entry.url}}';
this.page.identifier = '{{entry.id}}';
this.page.title = '{{entry.title}}';
};
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://{{shortname}}.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>{{'Please enable JavaScript to view the comments.'|t}}</noscript>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.