mirror of
https://github.com/quartz-community/comments.git
synced 2026-07-22 02:50:28 +00:00
No description
| .github/workflows | ||
| dist | ||
| src | ||
| test | ||
| types | ||
| .eslintrc.json | ||
| .gitignore | ||
| .prettierignore | ||
| .prettierrc | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| tsup.config.ts | ||
| vitest.config.ts | ||
@quartz-community/comments
Adds a comment section to pages using Giscus (GitHub Discussions), Bluesky, or Hacker News.
Installation
npx quartz plugin add github:quartz-community/comments
Usage
plugins:
- source: github:quartz-community/comments
enabled: true
options:
provider: giscus # Or "bluesky" or "hackernews"
options: {}
layout:
position: afterBody
priority: 10
Providers Setup
1. Bluesky
Pulls a reply thread directly from a Bluesky post.
-
Set the provider to
"bluesky"inquartz.config.yaml. -
Add the
blueskyUrlfield pointing to the post in the page's frontmatter:--- title: My Blog Post blueskyUrl: https://bsky.app/profile/username.bsky.social/post/3mq... ---
2. Hacker News
Pulls a reply thread directly from a Hacker News item thread.
-
Set the provider to
"hackernews"inquartz.config.yaml. -
Add the
hnIdorhnUrlfield in the page's frontmatter:--- title: My Blog Post hnId: 123456 # Or full url: # hnUrl: https://news.ycombinator.com/item?id=123456 ---
3. Giscus
GitHub Discussions-based commenting system.
-
Set the provider to
"giscus". -
Provide your repository options:
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" | "bluesky" | "hackernews" |
- | The comment provider to use. |
options.repo |
string |
- | (Giscus only) The GitHub repository to use. |
options.repoId |
string |
- | (Giscus only) The ID of the GitHub repository. |
options.category |
string |
- | (Giscus only) The Discussions category to use. |
options.categoryId |
string |
- | (Giscus only) The ID of the category. |
options.themeUrl |
string |
undefined |
(Giscus only) Custom theme URL for Giscus. |
options.lightTheme |
string |
"light" |
(Giscus only) The light theme for Giscus. |
options.darkTheme |
string |
"dark" |
(Giscus only) The dark theme for Giscus. |
options.mapping |
string |
"url" |
(Giscus only) Page to discussion mapping. |
options.strict |
boolean |
true |
(Giscus only) Use strict discussion matching. |
options.reactionsEnabled |
boolean |
true |
(Giscus only) Enable reactions for comments. |
options.inputPosition |
"top" | "bottom" |
"bottom" |
(Giscus only) The position of the input box. |
options.lang |
string |
"en" |
(Giscus only) The language for Giscus. |
Customization
You can conditionally disable comments on a specific page by setting comments: false in that page's frontmatter:
---
title: Comments Disabled
comments: false
---
Documentation
See the Quartz documentation for more information.
License
MIT