mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 23:04:05 -06:00
Updated docs with example
This commit is contained in:
parent
5231007949
commit
d3d6eee220
@ -63,12 +63,15 @@ type Options = {
|
||||
category: string
|
||||
categoryId: string
|
||||
|
||||
// Url to folder with custom themes
|
||||
// defaults to 'https://giscus.app/themes'
|
||||
themeUrl?: string
|
||||
|
||||
// filename for light theme .css file
|
||||
// defaults to 'light'
|
||||
lightTheme?: string
|
||||
|
||||
// filename for dark theme .css file
|
||||
// defaults to 'dark'
|
||||
darkTheme?: string
|
||||
|
||||
@ -90,3 +93,24 @@ type Options = {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 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", // corresponds to quartz/static/
|
||||
lightTheme: "light-theme", // corresponds to light-theme.css in quartz/static/
|
||||
darkTheme: "dark-theme", // corresponds to dark-theme.css quartz/static/
|
||||
}
|
||||
}),
|
||||
],
|
||||
```
|
||||
|
||||
Loading…
Reference in New Issue
Block a user