| | |
| | | strict?: boolean |
| | | reactionsEnabled?: boolean |
| | | inputPosition?: "top" | "bottom" |
| | | lang?: string |
| | | } |
| | | } |
| | | |
| | |
| | | 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 <></> |
| | | } |
| | |
| | | data-theme-url={ |
| | | opts.options.themeUrl ?? `https://${cfg.baseUrl ?? "example.com"}/static/giscus` |
| | | } |
| | | data-lang={opts.options.lang ?? "en"} |
| | | ></div> |
| | | ) |
| | | } |