diff options
author | Zhe Zhang <neomana@gmail.com> | 2016-01-31 04:51:08 +0300 |
---|---|---|
committer | Zhe Zhang <neomana@gmail.com> | 2016-01-31 04:51:08 +0300 |
commit | a491cb0d5d01970c83d81cd58cb204091d085ee3 (patch) | |
tree | 01f9411c6228e6b337d44dfd99c90fb5b4d113c5 /layouts | |
parent | 83b02fc03fb50940b209dda7c17060c27dc9963f (diff) |
integrate Disqus
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/post/single.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/layouts/post/single.html b/layouts/post/single.html index 479555f..8f54087 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -23,6 +23,22 @@ </div> </div> </div> + {{ if .Params.comments }} + <div id="disqus_thread"></div> + <script> + var disqus_config = function () { + this.page.url = {{ .Permalink }}; + // this.page.identifier = PAGE_IDENTIFIER; + }; + (function() { + var d = document, s = d.createElement('script'); + s.src = '//{{ .Site.Params.DisqusShortname }}.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> + {{ end }} {{ partial "footer.html" . }} </div> <script src="{{ .Site.BaseURL }}/js/slim.js"></script> |