From 3ef2a24f4b976021ddef5936e81fa48f2efa7177 Mon Sep 17 00:00:00 2001
From: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 22 Oct 2024 21:54:41 +0000
Subject: [PATCH] chore(deps): bump the production-dependencies group across 1 directory with 7 updates (#1540)
---
docs/features/comments.md | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/docs/features/comments.md b/docs/features/comments.md
index 92ea754..1f11eff 100644
--- a/docs/features/comments.md
+++ b/docs/features/comments.md
@@ -63,6 +63,18 @@
category: string
categoryId: string
+ // Url to folder with custom themes
+ // defaults to 'https://${cfg.baseUrl}/static/giscus'
+ themeUrl?: string
+
+ // filename for light theme .css file
+ // defaults to 'light'
+ lightTheme?: string
+
+ // filename for dark theme .css file
+ // defaults to 'dark'
+ darkTheme?: string
+
// how to map pages -> discussions
// defaults to 'url'
mapping?: "url" | "title" | "og:title" | "specific" | "number" | "pathname"
@@ -81,3 +93,24 @@
}
}
```
+
+#### Custom CSS theme
+
+Quartz supports custom theme for Giscus. To use a custom CSS theme, place the `.css` file inside the `quartz/static` folder and set the configuration values.
+
+For example, if you have a light theme `light-theme.css`, a dark theme `dark-theme.css`, and your Quartz site is hosted at `https://example.com/`:
+
+```ts
+afterBody: [
+ Component.Comments({
+ provider: 'giscus',
+ options: {
+ // Other options
+
+ themeUrl: "https://example.com/static/giscus", // corresponds to quartz/static/giscus/
+ lightTheme: "light-theme", // corresponds to light-theme.css in quartz/static/giscus/
+ darkTheme: "dark-theme", // corresponds to dark-theme.css quartz/static/giscus/
+ }
+ }),
+],
+```
--
Gitblit v1.10.0