summaryrefslogtreecommitdiffstats
path: root/layouts/partials/comment-disqus.html
diff options
context:
space:
mode:
authorDSRKafuU2020-04-23 23:34:45 +0800
committerGitHub2020-04-23 23:34:45 +0800
commit50900be20164758f1ae3ef1fb18d65424bc98743 (patch)
treea01ec7f161f73deac667b4e51be4f374b9ea8f5b /layouts/partials/comment-disqus.html
parentaaa441e5f2e065ebcf1e645f7924e9ef28b8d242 (diff)
parent29f2e593583861173b212c0495dec2e26206072b (diff)
downloadhugo-theme-fuji-50900be20164758f1ae3ef1fb18d65424bc98743.tar.gz
hugo-theme-fuji-50900be20164758f1ae3ef1fb18d65424bc98743.tar.bz2
hugo-theme-fuji-50900be20164758f1ae3ef1fb18d65424bc98743.zip
Merge pull request #5 from amzrk2/dev
Merge v1.2.0 dev branch
Diffstat (limited to 'layouts/partials/comment-disqus.html')
-rw-r--r--layouts/partials/comment-disqus.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/layouts/partials/comment-disqus.html b/layouts/partials/comment-disqus.html
index 4477226..81c9c68 100644
--- a/layouts/partials/comment-disqus.html
+++ b/layouts/partials/comment-disqus.html
@@ -1,16 +1,18 @@
+{{ with .Site.Params.disqusShortname }}
<div id="post-comment">
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
- this.page.url = "{{ .Permalink }}";
- this.page.identifier = "{{ .RelPermalink }}";
+ 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.src = 'https://{{ . }}.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
-</div> \ No newline at end of file
+</div>
+{{ end }} \ No newline at end of file