From 67e1beea7052ea515d47b881d4a30fa3ed847b0b Mon Sep 17 00:00:00 2001
From: Emile Bangma <github@emilebangma.com>
Date: Thu, 17 Oct 2024 22:30:16 +0000
Subject: [PATCH] feat(comments): support custom giscus themes (#1526)
---
quartz/components/Comments.tsx | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/quartz/components/Comments.tsx b/quartz/components/Comments.tsx
index 8e44940..44331cc 100644
--- a/quartz/components/Comments.tsx
+++ b/quartz/components/Comments.tsx
@@ -10,6 +10,9 @@
repoId: string
category: string
categoryId: string
+ themeUrl?: string
+ lightTheme?: string
+ darkTheme?: string
mapping?: "url" | "title" | "og:title" | "specific" | "number" | "pathname"
strict?: boolean
reactionsEnabled?: boolean
@@ -34,6 +37,11 @@
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`
+ }
></div>
)
}
--
Gitblit v1.10.0