fix: make filter checks more strict (closes #1519)
| | |
| | | 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 === true |
| | | return !draftFlag |
| | | }, |
| | | }) |
| | |
| | | export const ExplicitPublish: QuartzFilterPlugin = () => ({ |
| | | name: "ExplicitPublish", |
| | | shouldPublish(_ctx, [_tree, vfile]) { |
| | | return vfile.data?.frontmatter?.publish ?? false |
| | | return vfile.data?.frontmatter?.publish === true |
| | | }, |
| | | }) |