Quartz's default comments plugin.
  • TypeScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-09 23:01:41 +01:00
.changeset chore: version package 2026-11-09 04:00:43 +00:00
.github/workflows ci: run ci.yml on the changesets version PR and report it as a commit status 2026-11-09 03:47:26 +01:00
src fix: only suppress comments on explicit false / "false" override 2026-04-16 15:43:08 +02:00
test fix: only suppress comments on explicit false / "false" override 2026-04-16 15:43:08 +02:00
types chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
.eslintrc.json chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
.gitignore chore: migrate to npm publishing 2026-07-23 09:06:52 +02:00
.prettierignore chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
.prettierrc Initial commit 2026-02-09 23:01:53 +01:00
CHANGELOG.md chore: version package 2026-11-09 04:00:43 +00:00
LICENSE Initial commit 2026-02-09 23:01:53 +01:00
package-lock.json chore: version package 2026-11-09 04:00:43 +00:00
package.json chore: version package 2026-11-09 04:00:43 +00:00
README.md docs(readme): Quartz 5.1 — npm install and config, correct options and defaults 2026-11-09 22:56:17 +01:00
tsconfig.build.json fix: use separate tsconfig for DTS build to avoid vitest dependency 2026-03-22 13:12:01 +01:00
tsconfig.json chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
tsup.config.ts build: keep preact and the other shared packages external (tsup's noExternal overrode them) 2026-11-09 04:49:13 +01:00
vitest.config.ts Initial commit 2026-02-09 23:01:53 +01:00

@quartz-community/comments

Adds a comment section to pages using Giscus (GitHub Discussions-based). Giscus is currently the only provider.

The repository must be public, have the giscus app installed and Discussions enabled. Use the Giscus site to look up repoId and categoryId.

Installation

npx quartz plugin add @quartz-community/comments

It is already in the default quartz.config.yaml (disabled); set enabled: true and fill in the Giscus options to turn it on.

Usage

plugins:
  - source: "@quartz-community/comments"
    enabled: true
    options:
      provider: giscus
      options:
        repo: your-name/your-repo
        repoId: your-repo-id
        category: Announcements
        categoryId: your-category-id
    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-name/your-repo",
    repoId: "your-repo-id",
    category: "your-category",
    categoryId: "your-category-id",
  },
});

Configuration

Option Type Default Description
provider "giscus" "giscus" The comment provider to use.
options.repo `${string}/${string}` required The GitHub repository (owner/name) to use for comments.
options.repoId string required The ID of the GitHub repository.
options.category string required The GitHub Discussions category to use.
options.categoryId string required The ID of the GitHub Discussions category.
options.themeUrl string "https://<baseUrl>/static/giscus" URL of the folder with the Giscus theme .css files.
options.lightTheme string "light" File name (without .css) of the light theme.
options.darkTheme string "dark" File name (without .css) of the dark theme.
options.mapping "url" | "title" | "og:title" | "specific" | "number" | "pathname" "url" The mapping between pages and discussions.
options.strict boolean true Whether to use strict title matching for discussions.
options.reactionsEnabled boolean true Whether to enable reactions for the main post.
options.inputPosition "top" | "bottom" "bottom" The position of the comment input box.
options.lang string "en" The language for Giscus.

The default theme files (light.css, dark.css) ship with Quartz in quartz/static/giscus/, so the default themeUrl needs baseUrl to be your real domain. For a custom theme, put its .css file in quartz/static/giscus/ and set lightTheme / darkTheme.

Disabling comments on a page

Set comments: false in a page's frontmatter to hide the comment section on that page:

---
title: Comments disabled here!
comments: false
---

Documentation

See the Quartz documentation for more information.

License

MIT