From c98ef7e89f2c63d417d2c9ae364c56308f8501fc Mon Sep 17 00:00:00 2001
From: Aaron Pham <contact@aarnphm.xyz>
Date: Fri, 03 Jan 2025 19:27:43 +0000
Subject: [PATCH] perf(img): lazy load chunks (#1700)
---
quartz/plugins/emitters/contentPage.tsx | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/quartz/plugins/emitters/contentPage.tsx b/quartz/plugins/emitters/contentPage.tsx
index 904a8a8..8788f33 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,8 +106,9 @@
containsIndex = true
}
- const externalResources = pageResources(pathToRoot(slug), resources)
+ const externalResources = pageResources(pathToRoot(slug), file.data, resources)
const componentData: QuartzComponentProps = {
+ ctx,
fileData: file.data,
externalResources,
cfg,
--
Gitblit v1.10.0