init: init commit
All checks were successful
Build and Deploy Quartz / build-and-deploy (push) Has been skipped

This commit is contained in:
2026-01-01 14:16:34 +08:00
commit 4a5acab07d
216 changed files with 40383 additions and 0 deletions

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"