From da1b6b37fe2ee09359b532f0d2669975b4476c95 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Fri, 14 Mar 2025 17:05:26 +0000
Subject: [PATCH] fix(explorer): fix incorrect recursive case for folder rendering

---
 quartz/plugins/emitters/aliases.ts |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/quartz/plugins/emitters/aliases.ts b/quartz/plugins/emitters/aliases.ts
index b5bfff0..a16093b 100644
--- a/quartz/plugins/emitters/aliases.ts
+++ b/quartz/plugins/emitters/aliases.ts
@@ -6,9 +6,6 @@
 
 export const AliasRedirects: QuartzEmitterPlugin = () => ({
   name: "AliasRedirects",
-  getQuartzComponents() {
-    return []
-  },
   async getDependencyGraph(ctx, content, _resources) {
     const graph = new DepGraph<FilePath>()
 
@@ -21,16 +18,13 @@
 
     return graph
   },
-  async emit(ctx, content, _resources): Promise<FilePath[]> {
-    const { argv } = ctx
-    const fps: FilePath[] = []
-
+  async *emit(ctx, content, _resources) {
     for (const [_tree, file] of content) {
       const ogSlug = simplifySlug(file.data.slug!)
 
       for (const slug of file.data.aliases ?? []) {
         const redirUrl = resolveRelative(slug, file.data.slug!)
-        const fp = await write({
+        yield write({
           ctx,
           content: `
             <!DOCTYPE html>
@@ -47,10 +41,7 @@
           slug,
           ext: ".html",
         })
-
-        fps.push(fp)
       }
     }
-    return fps
   },
 })

--
Gitblit v1.10.0