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