| | |
| | | } |
| | | |
| | | export default ((opts: Options) => { |
| | | const Comments: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => { |
| | | const Comments: QuartzComponent = ({ displayClass, fileData, cfg }: QuartzComponentProps) => { |
| | | // check if comments should be displayed according to frontmatter |
| | | const disableComment: boolean = |
| | | typeof fileData.frontmatter?.comments !== "undefined" && |
| | | (!fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false") |
| | | if (disableComment) { |
| | | return <></> |
| | | } |
| | | |
| | | return ( |
| | | <div |
| | | class={classNames(displayClass, "giscus")} |