From ec00a40aefca73596ab76e3ebe3a8e1129b43688 Mon Sep 17 00:00:00 2001
From: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 27 Jan 2026 18:27:17 +0000
Subject: [PATCH] chore(deps): bump the production-dependencies group with 4 updates (#2289)
---
quartz/components/Comments.tsx | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/quartz/components/Comments.tsx b/quartz/components/Comments.tsx
index 8e44940..a731521 100644
--- a/quartz/components/Comments.tsx
+++ b/quartz/components/Comments.tsx
@@ -10,10 +10,14 @@
repoId: string
category: string
categoryId: string
+ themeUrl?: string
+ lightTheme?: string
+ darkTheme?: string
mapping?: "url" | "title" | "og:title" | "specific" | "number" | "pathname"
strict?: boolean
reactionsEnabled?: boolean
inputPosition?: "top" | "bottom"
+ lang?: string
}
}
@@ -22,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")}
@@ -34,6 +46,12 @@
data-strict={boolToStringBool(opts.options.strict ?? true)}
data-reactions-enabled={boolToStringBool(opts.options.reactionsEnabled ?? true)}
data-input-position={opts.options.inputPosition ?? "bottom"}
+ data-light-theme={opts.options.lightTheme ?? "light"}
+ data-dark-theme={opts.options.darkTheme ?? "dark"}
+ data-theme-url={
+ opts.options.themeUrl ?? `https://${cfg.baseUrl ?? "example.com"}/static/giscus`
+ }
+ data-lang={opts.options.lang ?? "en"}
></div>
)
}
--
Gitblit v1.10.0