diff options
| author | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-07-20 20:11:58 +0530 |
|---|---|---|
| committer | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-07-20 20:11:58 +0530 |
| commit | e933bf39b74518c8739a9d6a683b3fe5ebca066d (patch) | |
| tree | 0e383d07558bc6f7644c96cf021e2c4893f989b5 | |
| parent | e17e38b3aec51e504c39425aa3f6008b050b19de (diff) | |
comments: rm comments
- user needs to enable comments in hugo config
+ params:
comments: true
- disabled by default
| -rw-r--r-- | layouts/_default/single.html | 22 | ||||
| -rw-r--r-- | layouts/partials/comments.html | 5 |
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 |
