From 7b430aaaca25987db4d1ece449e8ba65a06904f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Lijcklama=20=C3=A0=20Nijeholt?= Date: Tue, 29 Mar 2022 11:33:18 +0200 Subject: [PATCH] Adds flag to hide comments on a page-to-page basis --- archetypes/posts.md | 1 + layouts/_default/single.html | 2 ++ 2 files changed, 3 insertions(+) diff --git a/archetypes/posts.md b/archetypes/posts.md index 162f37a..9cacca3 100644 --- a/archetypes/posts.md +++ b/archetypes/posts.md @@ -9,4 +9,5 @@ keywords = ["", ""] description = "" showFullContent = false readingTime = false +hideComments = false +++ diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 3d375ad..22146f4 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -49,6 +49,8 @@ {{ partial "posts_pagination.html" . }} {{ end }} + {{ if not (.Params.hideComments | default false) }} {{ partial "comments.html" . }} + {{ end }} {{ end }}