Initial commit

This commit is contained in:
kirbara 2025-12-02 09:52:11 +07:00
commit 3f501820b1
Signed by: exp
GPG key ID: D7E63AD0019E75D9
173 changed files with 24001 additions and 0 deletions

10
quartz/plugins/filters/draft.ts Executable file
View 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
},
})

View 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"
},
})

View file

@ -0,0 +1,2 @@
export { RemoveDrafts } from "./draft"
export { ExplicitPublish } from "./explicit"