Jacky Zhao
2023-06-01 04eeb2d10c2bb8cac595a879446c1dcbfac4d6a6
1
2
3
4
5
6
7
8
9
10
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
  }
}