From 23df17233da3f16db5166cf8a05b2089bd1f006a Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 10 Mar 2025 18:39:08 +0000
Subject: [PATCH] fix(graph): make graph non-singleton, proper cleanup, fix radial
---
quartz/plugins/emitters/contentPage.tsx | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/quartz/plugins/emitters/contentPage.tsx b/quartz/plugins/emitters/contentPage.tsx
index f493802..f59ff6b 100644
--- a/quartz/plugins/emitters/contentPage.tsx
+++ b/quartz/plugins/emitters/contentPage.tsx
@@ -59,14 +59,25 @@
...userOpts,
}
- const { head: Head, header, beforeBody, pageBody, left, right, footer: Footer } = opts
+ const { head: Head, header, beforeBody, pageBody, afterBody, left, right, footer: Footer } = opts
const Header = HeaderConstructor()
const Body = BodyConstructor()
return {
name: "ContentPage",
getQuartzComponents() {
- return [Head, Header, Body, ...header, ...beforeBody, pageBody, ...left, ...right, Footer]
+ return [
+ Head,
+ Header,
+ Body,
+ ...header,
+ ...beforeBody,
+ pageBody,
+ ...afterBody,
+ ...left,
+ ...right,
+ Footer,
+ ]
},
async getDependencyGraph(ctx, content, _resources) {
const graph = new DepGraph<FilePath>()
@@ -95,7 +106,7 @@
containsIndex = true
}
- const externalResources = pageResources(pathToRoot(slug), resources)
+ const externalResources = pageResources(pathToRoot(slug), file.data, resources)
const componentData: QuartzComponentProps = {
ctx,
fileData: file.data,
@@ -120,7 +131,7 @@
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.`,
),
)
}
--
Gitblit v1.10.0