diff options
author | Gyorgy Orban <o.gyorgy@gmail.com> | 2017-11-18 18:31:03 +0300 |
---|---|---|
committer | Gyorgy Orban <o.gyorgy@gmail.com> | 2017-11-18 18:35:53 +0300 |
commit | 02216926304ffc939834d4fe11ab83cafca017fa (patch) | |
tree | 4f1187dedeb4b548d3285dea25479fc504622886 | |
parent | b295131e72cba109a75b4a18f21da6c07c915ce8 (diff) |
remove localhost check for disqus, fixed in v0.25
injecting Disqus on localhost created unwanted
discussions from 'localhost:1313' this is fixed
in Hugo v0.25
-rw-r--r-- | layouts/partials/disqus.html | 21 | ||||
-rw-r--r-- | layouts/partials/postfooter.html | 2 |
2 files changed, 1 insertions, 22 deletions
diff --git a/layouts/partials/disqus.html b/layouts/partials/disqus.html deleted file mode 100644 index 95f4404..0000000 --- a/layouts/partials/disqus.html +++ /dev/null @@ -1,21 +0,0 @@ -{{ if .Site.DisqusShortname }} -<div id="disqus_thread"></div> -<script type="text/javascript"> - -(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 dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; - var disqus_shortname = '{{ .Site.DisqusShortname }}'; - dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; - (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); -})(); -</script> -<noscript> - Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a> -</noscript> -<a href="http://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a> -{{ end }} diff --git a/layouts/partials/postfooter.html b/layouts/partials/postfooter.html index c7ee13e..d6096ec 100644 --- a/layouts/partials/postfooter.html +++ b/layouts/partials/postfooter.html @@ -8,5 +8,5 @@ </footer> {{ if eq .Type "post" }} - {{ partial "disqus.html" . }} + {{ template "_internal/disqus.html" . }} {{ end }} |