plyght
2024-11-22 e1d754ef79e8c04d6fe0f9031ce74baf48d3bb10
quartz/components/Comments.tsx
@@ -27,9 +27,9 @@
export default ((opts: Options) => {
  const Comments: QuartzComponent = ({ displayClass, fileData, cfg }: QuartzComponentProps) => {
    // check if comments should be displayed according to frontmatter
    const commentsFlag: boolean =
      fileData.frontmatter?.comments === true || fileData.frontmatter?.comments === "true"
    if (!commentsFlag) {
    const disableComment: boolean =
      !fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false"
    if (disableComment) {
      return <></>
    }