From 5af707ea20e8106857750e1d6a0e43cf18679749 Mon Sep 17 00:00:00 2001
From: kabirgh <15871468+kabirgh@users.noreply.github.com>
Date: Sat, 17 Feb 2024 17:45:01 +0000
Subject: [PATCH] fix/feat(fast rebuild): re-render transclusions in normal and fastRebuild mode (#842)

---
 quartz/plugins/filters/draft.ts |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/quartz/plugins/filters/draft.ts b/quartz/plugins/filters/draft.ts
index 06083d2..65e2d6b 100644
--- a/quartz/plugins/filters/draft.ts
+++ b/quartz/plugins/filters/draft.ts
@@ -1,10 +1,9 @@
 import { QuartzFilterPlugin } from "../types"
-import { ProcessedContent } from "../vfile"
 
-export class RemoveDrafts extends QuartzFilterPlugin {
-  name = "RemoveDrafts"
-  shouldPublish([_tree, vfile]: ProcessedContent): boolean {
+export const RemoveDrafts: QuartzFilterPlugin<{}> = () => ({
+  name: "RemoveDrafts",
+  shouldPublish(_ctx, [_tree, vfile]) {
     const draftFlag: boolean = vfile.data?.frontmatter?.draft ?? false
     return !draftFlag
-  }
-}
+  },
+})

--
Gitblit v1.10.0