fix: "draft" true or false in frontmatter still removes from publishing #1244 (#1249)

* fix: draft bug #1244

* update: contents in folder before creating PR

* Update draft.ts
This commit is contained in:
Seohyun Kim 2024-07-01 12:59:08 +09:00 committed by GitHub
parent f7bd2137ec
commit 21e75acc8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,7 +3,7 @@ import { QuartzFilterPlugin } from "../types"
export const RemoveDrafts: QuartzFilterPlugin<{}> = () => ({
name: "RemoveDrafts",
shouldPublish(_ctx, [_tree, vfile]) {
const draftFlag: boolean = vfile.data?.frontmatter?.draft ?? false
const draftFlag: boolean = vfile.data?.frontmatter?.draft || false
return !draftFlag
},
})