mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-24 06:55:42 -05: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 { classNames } from "../util/lang"
|
||||||
|
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import script from "./scripts/comments.inline"
|
import script from "./scripts/comments.inline"
|
||||||
|
|
||||||
@ -27,8 +27,7 @@ function boolToStringBool(b: boolean): string {
|
|||||||
export default ((opts: Options) => {
|
export default ((opts: Options) => {
|
||||||
const Comments: QuartzComponent = ({ displayClass, fileData, cfg }: QuartzComponentProps) => {
|
const Comments: QuartzComponent = ({ displayClass, fileData, cfg }: QuartzComponentProps) => {
|
||||||
// check if comments should be displayed according to frontmatter
|
// check if comments should be displayed according to frontmatter
|
||||||
const disableComment: boolean =
|
const disableComment: boolean = fileData.frontmatter?.comments === "false"
|
||||||
!fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false"
|
|
||||||
if (disableComment) {
|
if (disableComment) {
|
||||||
return <></>
|
return <></>
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user