quartz-research-note/quartz/plugins/filters/explicit.ts

11 lines
341 B
TypeScript
Raw Normal View History

2023-05-30 15:02:20 +00:00
import { QuartzFilterPlugin } from "../types"
import { ProcessedContent } from "../vfile"
export class ExplicitPublish extends QuartzFilterPlugin {
name = "ExplicitPublish"
shouldPublish([_tree, vfile]: ProcessedContent): boolean {
const publishFlag: boolean = vfile.data?.frontmatter?.publish ?? false
return publishFlag
}
}