CaiJimmy / hugo-theme-stack

Card-style Hugo theme designed for bloggers
https://stack.jimmycai.com
GNU General Public License v3.0
4.89k stars 1.6k forks source link

Possibility to disable comments in specific pages #957

Closed andreagrandi closed 7 months ago

andreagrandi commented 7 months ago

This pull request adds the possibility to disable comments in specific pages and posts, even if they are enabled globally.

For example to disable comments in a page, just add this:

comments:
  disabled: true

in the post meta data.

NOTE: I would be glad to also update the documentation, once this is accepted and merge but it's not clear how that should be done (I don't see any docs in this repository)

CaiJimmy commented 7 months ago

Hi, this feature is already available: https://stack.jimmycai.com/writing/frontmatter#comments

https://github.com/CaiJimmy/hugo-theme-stack/blob/255abd5c880bbd416cf1443f7503ad91729e61ff/layouts/_default/single.html#L35C1-L37C14

andreagrandi commented 7 months ago

Hi, this feature is already available: https://stack.jimmycai.com/writing/frontmatter#comments

https://github.com/CaiJimmy/hugo-theme-stack/blob/255abd5c880bbd416cf1443f7503ad91729e61ff/layouts/_default/single.html#L35C1-L37C14

oh, my bad then 🤦🏻‍♂️ when I tried it, it wasn't working for some reason (caching issues?) but I've tried again and it works as expected, thanks!