Today I updated Hugo the latest version(0.38) and met that it didn’t load disqus comments both locally and remotely. So I’ve replaced Hugo’s version in sequence, found v0.34 and former worked successfully.
I include my disqusShortname
in [params]
section of config.toml and {{ template "_internal/disqus.html" . }}
line in single.html of Hugo Frais theme properly(maybe).
Where internal template is, such HTML & JS below are embeded with v0.34 but after v0.35 the field goes completely blank.
Any ideas?
<div id="disqus_thread">
Disqus comments not available by default when the website is previewed locally.
</div>
<script>
var disqus_config = function () {};
(function() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
return;
}
var d = document, s = d.createElement('script'); s.async = true;
s.src = '//' + "mydisqususername" + '.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>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
Thank you,
Isari