mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Add disqus comments
This commit is contained in:
17
layouts/partials/disqus.html
Normal file
17
layouts/partials/disqus.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
(function() {
|
||||
// Don't ever inject Disqus on localhost--it creates unwanted
|
||||
// discussions from 'localhost:1313' on your Disqus account...
|
||||
if (window.location.hostname == "localhost")
|
||||
return;
|
||||
|
||||
var d = document, s = d.createElement('script');
|
||||
|
||||
s.src = '//phil-opp.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>
|
||||
@@ -12,4 +12,6 @@
|
||||
{{ .Content }}
|
||||
</article>
|
||||
|
||||
|
||||
{{ partial "disqus.html" . }}
|
||||
{{ partial "footer.html" . }}
|
||||
|
||||
Reference in New Issue
Block a user