mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 23:04:05 -06:00
fix(comments): show comments by default
This commit is contained in:
parent
e1d754ef79
commit
9c85c86c65
@ -1,5 +1,5 @@
|
||||
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||
import { classNames } from "../util/lang"
|
||||
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||
// @ts-ignore
|
||||
import script from "./scripts/comments.inline"
|
||||
|
||||
@ -27,8 +27,7 @@ function boolToStringBool(b: boolean): string {
|
||||
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"
|
||||
const disableComment: boolean = fileData.frontmatter?.comments === "false"
|
||||
if (disableComment) {
|
||||
return <></>
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user