mirror of
https://github.com/quartz-community/comments.git
synced 2026-07-22 02:50:28 +00:00
No description
Pre-built output is now committed to the repository so that Quartz can skip the build step during plugin installation. The prepare script is removed to prevent redundant builds when installing from npm/git. |
||
|---|---|---|
| .github/workflows | ||
| dist | ||
| src | ||
| test | ||
| .eslintrc.json | ||
| .gitignore | ||
| .prettierrc | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| tsup.config.ts | ||
| vitest.config.ts | ||
@quartz-community/comments
Adds a comment section to pages using Giscus (GitHub Discussions-based).
Installation
npx quartz plugin add github:quartz-community/comments
Usage
plugins:
- source: github:quartz-community/comments
enabled: true
options:
provider: giscus
options: {}
layout:
position: afterBody
priority: 10
For advanced use cases, you can override in TypeScript:
import * as ExternalPlugin from "./.quartz/plugins";
ExternalPlugin.Comments({
provider: "giscus",
options: {
repo: "your-repo",
repoId: "your-repo-id",
category: "your-category",
categoryId: "your-category-id",
},
});
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
provider |
"giscus" |
- | The comment provider to use. |
options.repo |
string |
- | The GitHub repository to use for comments. |
options.repoId |
string |
- | The ID of the GitHub repository. |
options.category |
string |
- | The GitHub Discussions category to use. |
options.categoryId |
string |
- | The ID of the GitHub Discussions category. |
options.themeUrl |
string |
undefined |
Custom theme URL for Giscus. |
options.lightTheme |
string |
"light" |
The light theme for Giscus. |
options.darkTheme |
string |
"dark" |
The dark theme for Giscus. |
options.mapping |
string |
"url" |
The mapping between pages and discussions. |
options.strict |
boolean |
true |
Whether to use strict matching for discussions. |
options.reactionsEnabled |
boolean |
true |
Whether to enable reactions for comments. |
options.inputPosition |
"top" | "bottom" |
"bottom" |
The position of the comment input box. |
options.lang |
string |
"en" |
The language for Giscus. |
Documentation
See the Quartz documentation for more information.
License
MIT