How to disable comments in specific pages?

Hi, all.

I have comments enalbed (gitalk to be exactly). It works perfect byt I want to disable comments in specific pages( for instance, Terms of Use and Privacy Service pages).

My first attempt was to make a copy of




and edit it to remove comments snippet. The problem is that it removed comments from all pages.

Could someone point me how to do it?

Thank you.


I’m using

  • Hugo version 0.60.1
  • Zzo theme (updated yesterday)

You still need to decide how a page knows if comments should show. Adding an option to a page’s frontmatter works for that.

1 Like

In your layout (, something like:

    {{ if not .Params.noComment }}
    {{ end }}

In your frontmatter (yaml):

noComment: true

Sorry guys for taking so long to reply.

@nfriedli Your answer solved my problem. Thanks.

And thank you @maiki for pointing me the docs.