Skip to content

Commit

Permalink
fix(comments): only hide Giscus if comments == false is explicitly se…
Browse files Browse the repository at this point in the history
…t in frontmatter
  • Loading branch information
saberzero1 committed Dec 1, 2024
1 parent e1d754e commit 200ddc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion quartz/components/Comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export default ((opts: Options) => {
const Comments: QuartzComponent = ({ displayClass, fileData, cfg }: QuartzComponentProps) => {
// check if comments should be displayed according to frontmatter
const disableComment: boolean =
!fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false"
typeof fileData.frontmatter?.comments !== "undefined" &&
(!fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false")
if (disableComment) {
return <></>
}
Expand Down

0 comments on commit 200ddc0

Please sign in to comment.