From a727b57e46355ae59ac6f26078c29f0d24b2b841 Mon Sep 17 00:00:00 2001
From: Jules Kreuer <25013642+not-a-feature@users.noreply.github.com>
Date: Thu, 21 Nov 2024 00:29:43 +0000
Subject: [PATCH] docs(hosting): add apache config example (#1608)
---
quartz/components/Comments.tsx | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/quartz/components/Comments.tsx b/quartz/components/Comments.tsx
index 44331cc..5f29860 100644
--- a/quartz/components/Comments.tsx
+++ b/quartz/components/Comments.tsx
@@ -25,7 +25,14 @@
}
export default ((opts: Options) => {
- const Comments: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => {
+ const Comments: QuartzComponent = ({ displayClass, fileData, cfg }: QuartzComponentProps) => {
+ // check if comments should be displayed according to frontmatter
+ const disableComment: boolean =
+ !fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false"
+ if (disableComment) {
+ return <></>
+ }
+
return (
<div
class={classNames(displayClass, "giscus")}
--
Gitblit v1.10.0