mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-31 00:34:05 -06:00
chore(comments): cleanup logic
This commit is contained in:
parent
b36f389eb8
commit
73b83a8768
@ -31,7 +31,7 @@ export default ((opts: Options) => {
|
|||||||
const commentsFlag: boolean =
|
const commentsFlag: boolean =
|
||||||
fileData.frontmatter?.comments === true || fileData.frontmatter?.comments === "true"
|
fileData.frontmatter?.comments === true || fileData.frontmatter?.comments === "true"
|
||||||
if ((opts.respectFrontmatter ?? false) && !commentsFlag) {
|
if ((opts.respectFrontmatter ?? false) && !commentsFlag) {
|
||||||
return null
|
return <></>
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -54,10 +54,7 @@ export default ((opts: Options) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// make sure we actually need to load the script
|
Comments.afterDOMLoaded = script
|
||||||
if (Comments != null) {
|
|
||||||
Comments.afterDOMLoaded = script
|
|
||||||
}
|
|
||||||
|
|
||||||
return Comments
|
return Comments
|
||||||
}) satisfies QuartzComponentConstructor<Options>
|
}) satisfies QuartzComponentConstructor<Options>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user