Add paige.comments.disable_kinds config

This commit is contained in:
Will Faught
2024-07-18 18:52:39 -07:00
parent 1fca28b8a7
commit 342da4cce9
2 changed files with 8 additions and 1 deletions

View File

@@ -1,6 +1,12 @@
{{ $page := . }}
{{ if $page.Param "paige.comments.disable" | not }}
{{ $disable := $page.Param "paige.comments.disable" }}
{{ $disablekinds := $page.Param "paige.comments.disable_kinds" }}
{{ $enabled := $disable | not }}
{{ $enabledkind := or (not $disablekinds) (not (in $disablekinds $page.Kind)) }}
{{ if and $enabled $enabledkind }}
{{ template "_internal/disqus.html" $page }}
{{ partial "paige/comments/cactus.html" $page }}
{{ partial "paige/comments/commento.html" $page }}