Initial commit
This commit is contained in:
commit
3f501820b1
173 changed files with 24001 additions and 0 deletions
10
quartz/plugins/filters/draft.ts
Executable file
10
quartz/plugins/filters/draft.ts
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
import { QuartzFilterPlugin } from "../types"
|
||||
|
||||
export const RemoveDrafts: QuartzFilterPlugin<{}> = () => ({
|
||||
name: "RemoveDrafts",
|
||||
shouldPublish(_ctx, [_tree, vfile]) {
|
||||
const draftFlag: boolean =
|
||||
vfile.data?.frontmatter?.draft === true || vfile.data?.frontmatter?.draft === "true"
|
||||
return !draftFlag
|
||||
},
|
||||
})
|
||||
8
quartz/plugins/filters/explicit.ts
Executable file
8
quartz/plugins/filters/explicit.ts
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
import { QuartzFilterPlugin } from "../types"
|
||||
|
||||
export const ExplicitPublish: QuartzFilterPlugin = () => ({
|
||||
name: "ExplicitPublish",
|
||||
shouldPublish(_ctx, [_tree, vfile]) {
|
||||
return vfile.data?.frontmatter?.publish === true || vfile.data?.frontmatter?.publish === "true"
|
||||
},
|
||||
})
|
||||
2
quartz/plugins/filters/index.ts
Executable file
2
quartz/plugins/filters/index.ts
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
export { RemoveDrafts } from "./draft"
|
||||
export { ExplicitPublish } from "./explicit"
|
||||
Loading…
Add table
Add a link
Reference in a new issue