diff --git a/content/index.md b/content/index.md new file mode 100644 index 000000000..cc2e2028e --- /dev/null +++ b/content/index.md @@ -0,0 +1,5 @@ +--- +draft: false +--- +this is index.md +go to \ No newline at end of file diff --git a/content/test.md b/content/test.md new file mode 100644 index 000000000..caf71f7d6 --- /dev/null +++ b/content/test.md @@ -0,0 +1,4 @@ +--- +draft: true +--- +this is index.md diff --git a/content/test2.md b/content/test2.md new file mode 100644 index 000000000..8e050f6e5 --- /dev/null +++ b/content/test2.md @@ -0,0 +1,6 @@ +--- +draft: false +--- +this is test2.md + +go to [[index]] \ No newline at end of file diff --git a/quartz/plugins/filters/draft.ts b/quartz/plugins/filters/draft.ts index 65e2d6b61..d2f25a595 100644 --- a/quartz/plugins/filters/draft.ts +++ b/quartz/plugins/filters/draft.ts @@ -3,7 +3,8 @@ import { QuartzFilterPlugin } from "../types" export const RemoveDrafts: QuartzFilterPlugin<{}> = () => ({ name: "RemoveDrafts", shouldPublish(_ctx, [_tree, vfile]) { - const draftFlag: boolean = vfile.data?.frontmatter?.draft ?? false + const draftFlag: boolean = vfile.data?.frontmatter?.draft || false + console.log(`######${draftFlag}`); return !draftFlag }, })