From a72b1a422485d4f2258e58c1f76f933cb24cf455 Mon Sep 17 00:00:00 2001
From: Felix Nie <hongtuo.nie@u.nus.edu>
Date: Sun, 16 Mar 2025 19:08:45 +0000
Subject: [PATCH] fix(explorer): vertically center the Explorer toggle under mobile view (#1847)
---
quartz/plugins/emitters/contentPage.tsx | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/quartz/plugins/emitters/contentPage.tsx b/quartz/plugins/emitters/contentPage.tsx
index 8788f33..f833930 100644
--- a/quartz/plugins/emitters/contentPage.tsx
+++ b/quartz/plugins/emitters/contentPage.tsx
@@ -94,9 +94,8 @@
return graph
},
- async emit(ctx, content, resources): Promise<FilePath[]> {
+ async *emit(ctx, content, resources) {
const cfg = ctx.cfg.configuration
- const fps: FilePath[] = []
const allFiles = content.map((c) => c[1].data)
let containsIndex = false
@@ -106,6 +105,10 @@
containsIndex = true
}
+ if (file.data.slug?.endsWith("/index")) {
+ continue
+ }
+
const externalResources = pageResources(pathToRoot(slug), file.data, resources)
const componentData: QuartzComponentProps = {
ctx,
@@ -118,25 +121,21 @@
}
const content = renderPage(cfg, slug, componentData, opts, externalResources)
- const fp = await write({
+ yield write({
ctx,
content,
slug,
ext: ".html",
})
-
- fps.push(fp)
}
if (!containsIndex && !ctx.argv.fastRebuild) {
console.log(
chalk.yellow(
- `\nWarning: you seem to be missing an \`index.md\` home page file at the root of your \`${ctx.argv.directory}\` folder. This may cause errors when deploying.`,
+ `\nWarning: you seem to be missing an \`index.md\` home page file at the root of your \`${ctx.argv.directory}\` folder (\`${path.join(ctx.argv.directory, "index.md")} does not exist\`). This may cause errors when deploying.`,
),
)
}
-
- return fps
},
}
}
--
Gitblit v1.10.0