Seohyun Kim
2024-07-01 21e75acc8d292c98a201e539d6f8ce4bd2941077
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
1 files modified
2 ■■■ changed files
quartz/plugins/filters/draft.ts 2 ●●● patch | view | raw | blame | history
quartz/plugins/filters/draft.ts
@@ -3,7 +3,7 @@
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
  },
})