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",
|
2023-07-24 07:04:01 +00:00
|
|
|
shouldPublish(_ctx, [_tree, vfile]) {
|
2023-05-30 15:02:20 +00:00
|
|
|
const publishFlag: boolean = vfile.data?.frontmatter?.publish ?? false
|
|
|
|
return publishFlag
|
2023-07-23 00:27:41 +00:00
|
|
|
},
|
2023-06-12 06:26:43 +00:00
|
|
|
})
|