From f7bd2137ecbb81f3ed50ae9ccaaee27ae855c11a Mon Sep 17 00:00:00 2001
From: Sean Missingham <smissingham@users.noreply.github.com>
Date: Mon, 01 Jul 2024 03:58:34 +0000
Subject: [PATCH] Permit Manual (and Scripted) Trigger of CI Job (#1251)
---
quartz/plugins/emitters/folderPage.tsx | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/quartz/plugins/emitters/folderPage.tsx b/quartz/plugins/emitters/folderPage.tsx
index 690fa56..d892b28 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[] = []
@@ -86,6 +95,7 @@
const externalResources = pageResources(pathToRoot(slug), resources)
const [tree, file] = folderDescriptions[folder]
const componentData: QuartzComponentProps = {
+ ctx,
fileData: file.data,
externalResources,
cfg,
--
Gitblit v1.10.0