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:
authorRise <8315221+AmazingRise@users.noreply.github.com>2022-02-19 10:08:20 +0300
committerGitHub <noreply@github.com>2022-02-19 10:08:20 +0300
commitfa693c6f4a564a27ed17979bd89d750839a0c211 (patch)
tree8e57c08fc4bf243e2cb28775c6cb0f9e83cf1601
parent0a481236ff49042278454589840d73a5a8f6ba69 (diff)
parentbd201a765be62afb251ac4fc357dfa7d27261bfe (diff)
Merge pull request #112 from idontwannarock/main
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 }}