mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-30 00:04:06 -06:00
fix(comments): only hide Giscus if comments == false is explicitly set in frontmatter
This commit is contained in:
parent
e1d754ef79
commit
200ddc0ea5
@ -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 <></>
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user