summaryrefslogtreecommitdiffstats
path: root/layouts/partials/comment-disqus.html
diff options
context:
space:
mode:
authoramzrk22020-04-15 13:29:44 +0800
committeramzrk22020-04-15 13:29:44 +0800
commita8f47568568dee333081a2d204fad41fd81cda93 (patch)
tree48aa6ae0720ee21a8cbc42d7f3d83fec206c40e9 /layouts/partials/comment-disqus.html
parent10b5414837fc272b73922e01d2fe24ddd5080293 (diff)
downloadhugo-theme-fuji-a8f47568568dee333081a2d204fad41fd81cda93.tar.gz
hugo-theme-fuji-a8f47568568dee333081a2d204fad41fd81cda93.tar.bz2
hugo-theme-fuji-a8f47568568dee333081a2d204fad41fd81cda93.zip
Disqus support
Diffstat (limited to 'layouts/partials/comment-disqus.html')
-rw-r--r--layouts/partials/comment-disqus.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/layouts/partials/comment-disqus.html b/layouts/partials/comment-disqus.html
new file mode 100644
index 0000000..4477226
--- /dev/null
+++ b/layouts/partials/comment-disqus.html
@@ -0,0 +1,16 @@
+<div id="post-comment">
+ <div id="disqus_thread"></div>
+ <script>
+ var disqus_config = function () {
+ this.page.url = "{{ .Permalink }}";
+ this.page.identifier = "{{ .RelPermalink }}";
+ };
+ (function () {
+ var d = document,
+ s = d.createElement('script');
+ s.src = 'https://{{ .Site.Params.disqusShortname }}.disqus.com/embed.js';
+ s.setAttribute('data-timestamp', +new Date());
+ (d.head || d.body).appendChild(s);
+ })();
+ </script>
+</div> \ No newline at end of file