Francisco Gama T. R.
2024-12-03 5a5ef670fee5f5f65981801a7ec9c2e563fe99ad
quartz/components/Comments.tsx
@@ -27,9 +27,10 @@
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 =
      typeof fileData.frontmatter?.comments !== "undefined" &&
      (!fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false")
    if (disableComment) {
      return <></>
    }