summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/_default/single.html22
-rw-r--r--layouts/partials/comments.html5
2 files changed, 8 insertions, 19 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 8221a23..0897600 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -20,25 +20,9 @@
</ul>
</footer>
{{- end }}
- <!-- Comments area start -->
- {{- if not (eq .Params.comments false) }}
- {{- if .Site.DisqusShortname }}
- <div id="disqus_thread"></div>
- <script>
- var disqus_shortname = '{{ .Site.DisqusShortname }}';
- (function () {
- var d = document, s = d.createElement('script');
- s.src = 'https://' + disqus_shortname + '.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">comments powered by Disqus.</a>
- </noscript>
- <!-- Comments area end -->
- {{- end }}
+
+ {{- if $.Site.Params.comments }}
+ {{- partial "comments.html" . }}
{{- end }}
</article>
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html
new file mode 100644
index 0000000..d6ff010
--- /dev/null
+++ b/layouts/partials/comments.html
@@ -0,0 +1,5 @@
+<!-- Comments area start -->
+<!--
+to add comments read => https://gohugo.io/content-management/comments/
+-->
+<!-- Comments area end --> \ No newline at end of file