1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 12:56:21 -04:00

23 lines
889 B
HTML

{{ if .Site.DisqusShortname }}
{{ if ne .Params.comments false }}
<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
this.page.title = '{{ $.Title }}';
this.page.url = '{{ $.Permalink }}';
this.page.identifier = '{{ $.Permalink }}';
};
(function() {
// Don't clutter Disqus account with localhost URLs.
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) return;
var d = document, s = d.createElement('script'); s.async = true;
s.src = 'https://' + {{ $.Site.DisqusShortname }} + '.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" rel="nofollow">comments powered by Disqus.</a></noscript>
{{ end }}
{{ end }}