diff --git a/docs/features/comments.md b/docs/features/comments.md index f17060b02..48037735a 100644 --- a/docs/features/comments.md +++ b/docs/features/comments.md @@ -57,7 +57,6 @@ Quartz also exposes a few of the other Giscus options as well and you can provid ```ts type Options = { provider: "giscus" - respectFrontmatter?: boolean options: { repo: `${string}/${string}` repoId: string @@ -118,11 +117,11 @@ afterBody: [ #### Conditionally display comments -Quartz can conditionally display the comment box based on a field `comments` in the frontmatter. To enable this feature, set `respectFrontmatter` to `true` & adjust pages where comments should be enabled: +Quartz can conditionally display the comment box based on a field `comments` in the frontmatter. By default, all pages will display comments, to disable it for a specific page, set `comments` to `false`. ``` --- -title: Comments enabled here! -comments: true +title: Comments disabled here! +comments: false --- ``` diff --git a/quartz/components/Comments.tsx b/quartz/components/Comments.tsx index d8f06a242..5f379a1bd 100644 --- a/quartz/components/Comments.tsx +++ b/quartz/components/Comments.tsx @@ -5,7 +5,6 @@ import script from "./scripts/comments.inline" type Options = { provider: "giscus" - respectFrontmatter?: boolean options: { repo: `${string}/${string}` repoId: string @@ -30,7 +29,7 @@ export default ((opts: Options) => { // check if comments should be displayed according to frontmatter const commentsFlag: boolean = fileData.frontmatter?.comments === true || fileData.frontmatter?.comments === "true" - if ((opts.respectFrontmatter ?? false) && !commentsFlag) { + if (!commentsFlag) { return <> }