From efddd798e83705b0e17e074fe344b2d491051ba2 Mon Sep 17 00:00:00 2001
From: Emile Bangma <github@emilebangma.com>
Date: Wed, 30 Jul 2025 16:43:36 +0000
Subject: [PATCH] revert(graph): roll back changes due to issues with Safari (#2067)
---
quartz/components/Comments.tsx | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/quartz/components/Comments.tsx b/quartz/components/Comments.tsx
index 44331cc..a731521 100644
--- a/quartz/components/Comments.tsx
+++ b/quartz/components/Comments.tsx
@@ -17,6 +17,7 @@
strict?: boolean
reactionsEnabled?: boolean
inputPosition?: "top" | "bottom"
+ lang?: string
}
}
@@ -25,7 +26,15 @@
}
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 =
+ typeof fileData.frontmatter?.comments !== "undefined" &&
+ (!fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false")
+ if (disableComment) {
+ return <></>
+ }
+
return (
<div
class={classNames(displayClass, "giscus")}
@@ -42,6 +51,7 @@
data-theme-url={
opts.options.themeUrl ?? `https://${cfg.baseUrl ?? "example.com"}/static/giscus`
}
+ data-lang={opts.options.lang ?? "en"}
></div>
)
}
--
Gitblit v1.10.0