Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/AmazingRise/hugo-theme-diary.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Wang <idontwannarock@gmail.com>2022-01-21 15:04:19 +0300
committerHoward Wang <idontwannarock@gmail.com>2022-01-21 15:04:19 +0300
commitbd201a765be62afb251ac4fc357dfa7d27261bfe (patch)
tree92135d2e607583363bea92720be4761da29901a5
parenta5d67c7a3fceaa7d8cd5888971fab0883d0968ae (diff)
fix: integrated Disqus comment partial not displaying
-rw-r--r--layouts/partials/comment.html30
1 files changed, 25 insertions, 5 deletions
diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html
index 35b6360..8514492 100644
--- a/layouts/partials/comment.html
+++ b/layouts/partials/comment.html
@@ -1,9 +1,29 @@
{{ if .Site.Params.disqusShortname }}
-<div class="comments">
- <vue-disqus shortname="{{.Site.Params.disqusShortname}}"></vue-disqus>
-</div>
-<noscript><noscript>{{ i18n "comments_activate_js" }}</noscript></noscript>
-<a href="https://disqus.com/" class="dsq-brlink">Comments powered by <span class="logo-disqus">Disqus</span></a>
+<div id="disqus_thread"></div>
+<script>
+ /**
+ * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT
+ * THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR
+ * PLATFORM OR CMS.
+ *
+ * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT:
+ * https://disqus.com/admin/universalcode/#configuration-variables
+ */
+ var disqus_config = function () {
+ // Replace PAGE_URL with your page's canonical URL variable
+ this.page.url = '{{ .Permalink }}';
+
+ // Replace PAGE_IDENTIFIER with your page's unique identifier variable
+ this.page.identifier = '{{ .Permalink }}';
+ };
+ (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>
+<noscript> Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow"> comments powered by Disqus. </a> </noscript>
{{ end }}
{{ if .Site.Params.enableGitalk }}