From 06e3f8b93d5fbe96e7a05e4eb6be97b6a2d7ead0 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sat, 17 Feb 2024 18:34:51 +0000
Subject: [PATCH] fix(style): introduce semiBoldWeight and various improvements to reduce CLS
---
quartz/plugins/emitters/folderPage.tsx | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/quartz/plugins/emitters/folderPage.tsx b/quartz/plugins/emitters/folderPage.tsx
index 690fa56..bf69d29 100644
--- a/quartz/plugins/emitters/folderPage.tsx
+++ b/quartz/plugins/emitters/folderPage.tsx
@@ -38,12 +38,21 @@
getQuartzComponents() {
return [Head, Header, Body, ...header, ...beforeBody, pageBody, ...left, ...right, Footer]
},
- async getDependencyGraph(_ctx, _content, _resources) {
+ async getDependencyGraph(_ctx, content, _resources) {
// Example graph:
- // nested/file.md --> nested/file.html
- // \-------> nested/index.html
- // TODO implement
- return new DepGraph<FilePath>()
+ // nested/file.md --> nested/index.html
+ // nested/file2.md ------^
+ const graph = new DepGraph<FilePath>()
+
+ content.map(([_tree, vfile]) => {
+ const slug = vfile.data.slug
+ const folderName = path.dirname(slug ?? "") as SimpleSlug
+ if (slug && folderName !== "." && folderName !== "tags") {
+ graph.addEdge(vfile.data.filePath!, joinSegments(folderName, "index.html") as FilePath)
+ }
+ })
+
+ return graph
},
async emit(ctx, content, resources): Promise<FilePath[]> {
const fps: FilePath[] = []
--
Gitblit v1.10.0