aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/comments.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/comments.html')
-rw-r--r--layouts/partials/comments.html39
1 files changed, 29 insertions, 10 deletions
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html
index 8728c17..afce2a3 100644
--- a/layouts/partials/comments.html
+++ b/layouts/partials/comments.html
@@ -4,24 +4,23 @@
<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;
+ // 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);
+ 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" target="_blank">comments powered by <span class="logo-disqus">Disqus</span></a>
{{- end }}
<!-- changyan -->
{{- if and .Site.Params.changyanAppid .Site.Params.changyanAppkey -}}
- <div id="SOHUCS"></div>
- <script type="text/javascript">
+ <div id="SOHUCS"></div>
+ <script type="text/javascript">
(function(){
if (window.location.hostname === 'localhost') return;
@@ -32,4 +31,24 @@
})();
</script>
{{- end }}
+
+ <!-- LiveRe -->
+ {{- if .Site.Params.livereUID -}}
+ <div id="lv-container" data-id="city" data-uid="{{ .Site.Params.livereUID }}">
+ <script type="text/javascript">
+ (function(d, s) {
+ var j, e = d.getElementsByTagName(s)[0];
+
+ if (typeof LivereTower === 'function') { return; }
+
+ j = d.createElement(s);
+ j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
+ j.async = true;
+
+ e.parentNode.insertBefore(j, e);
+ })(document, 'script');
+ </script>
+ <noscript>Please enable JavaScript to view the comments powered by <a href="https://livere.com/">LiveRe.</a></noscript>
+ </div>
+ {{- end }}
{{- end }} \ No newline at end of file