kakawait / hugo-tranquilpeak-theme

A gorgeous responsive theme for Hugo blog framework
https://tranquilpeak.kakawait.com
GNU General Public License v3.0
927 stars 525 forks source link

comments: false does not work #539

Closed christenbc closed 1 year ago

christenbc commented 3 years ago

Configuration

Actual behavior

Once disqus is enabled in the config file

 [params.comment]
    [params.comment.disqus]
      enable = false

the disqus section appears globally in every page, even in those which it should not despite having declared comments: false in the front matter.

Expected behavior

The disqus appears globally in every page except for the ones in whose front matter is declared comments: false.

Steps to reproduce the behavior

mathaou commented 1 year ago

Replace line 2 in layouts/partials/post/comments.html with this:

{{ if and ($.Params.comments) (.Site.Params.comment.disqus.enable) (not (.Site.Config.Privacy.Disqus.Disable)) }}

Then you can manipulate comments on a post-by-post basis.

christenbc commented 1 year ago

Thanks for your reply