You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.0 KiB
33 lines
1.0 KiB
<% if (theme.disqus_enabled && theme.disqus_shortname){ %>
|
|
<hr>
|
|
<section id="comments" class="mt-2 mb-3">
|
|
|
|
<div id="disqus_thread">
|
|
<a href="#" class="button button-primary" onclick="loadDisqus();return false;">View / Make Comments</a>
|
|
</div>
|
|
|
|
<script>
|
|
var disqus_config = function() {
|
|
this.page.url = '<%= config.url + '/' + page.canonical_path %>';
|
|
this.page.identifier = '<%= page.id || page.canonical_path %>';
|
|
this.page.title = '<%= page.title %>';
|
|
};
|
|
|
|
var is_disqus_loaded = false;
|
|
|
|
function loadDisqus() {
|
|
if (!is_disqus_loaded) {
|
|
is_disqus_loaded = true;
|
|
|
|
var d = document,
|
|
s = d.createElement('script');
|
|
s.src = 'https://<%= theme.disqus_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 <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
|
</section>
|
|
<% } %>
|