2018-10-16 05:28:42 +00:00
|
|
|
<% if (has_config('comment.shortname')) { %>
|
|
|
|
<script>
|
2016-06-24 02:26:19 +00:00
|
|
|
var disqus_config = function () {
|
2018-10-16 05:28:42 +00:00
|
|
|
this.page.url = '<%= page.permalink %>';
|
|
|
|
this.page.identifier = '<%= page.disqusId || page.path %>';
|
2016-06-24 02:26:19 +00:00
|
|
|
};
|
2018-10-16 05:28:42 +00:00
|
|
|
(function() {
|
2016-06-24 02:26:19 +00:00
|
|
|
var d = document, s = d.createElement('script');
|
2018-10-16 05:28:42 +00:00
|
|
|
s.src = '//' + '<%= get_config('comment.shortname') %>' + '.disqus.com/embed.js';
|
2016-06-24 02:26:19 +00:00
|
|
|
s.setAttribute('data-timestamp', +new Date());
|
|
|
|
(d.head || d.body).appendChild(s);
|
2016-02-06 13:39:29 +00:00
|
|
|
})();
|
2016-06-24 02:26:19 +00:00
|
|
|
</script>
|
2018-10-16 05:28:42 +00:00
|
|
|
<% } %>
|
|
|
|
<div id="disqus_thread">
|
|
|
|
<% if (!has_config('comment.shortname')) { %>
|
|
|
|
<div class="notification is-danger">
|
|
|
|
You forgot to set the <code>shortname</code> for Disqus. Please set it in <code>_config.yml</code>.
|
2016-02-06 13:39:29 +00:00
|
|
|
</div>
|
2018-10-16 05:28:42 +00:00
|
|
|
<% } %>
|
|
|
|
<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
|
|
|
</div>
|