Skip to content

Commit

Permalink
fix: "draft" true or false in frontmatter still removes from publishing
Browse files Browse the repository at this point in the history
jackyzha0#1244 (jackyzha0#1249)

* fix: draft bug jackyzha0#1244

* update: contents in folder before creating PR

* Update draft.ts
  • Loading branch information
1etterh authored and wingadium1 committed Aug 12, 2024
1 parent 7c7c45d commit cbb84b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quartz/plugins/filters/draft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
})

0 comments on commit cbb84b5

Please sign in to comment.