From ab80eba7941eb7dbf4944ec63d52e1bfc7925ddc Mon Sep 17 00:00:00 2001
From: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
Date: Sat, 10 Feb 2024 22:19:17 +0000
Subject: [PATCH] chore(callouts): remove unnecessary whitespaces after class name (#833)
---
quartz/plugins/emitters/folderPage.tsx | 24 +++++++++++++++++++-----
1 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/quartz/plugins/emitters/folderPage.tsx b/quartz/plugins/emitters/folderPage.tsx
index 8632ece..7a62cda 100644
--- a/quartz/plugins/emitters/folderPage.tsx
+++ b/quartz/plugins/emitters/folderPage.tsx
@@ -17,8 +17,11 @@
} from "../../util/path"
import { defaultListPageLayout, sharedPageComponents } from "../../../quartz.layout"
import { FolderContent } from "../../components"
+import { write } from "./helpers"
+import { i18n } from "../../i18n"
+import DepGraph from "../../depgraph"
-export const FolderPage: QuartzEmitterPlugin<FullPageLayout> = (userOpts) => {
+export const FolderPage: QuartzEmitterPlugin<Partial<FullPageLayout>> = (userOpts) => {
const opts: FullPageLayout = {
...sharedPageComponents,
...defaultListPageLayout,
@@ -35,7 +38,14 @@
getQuartzComponents() {
return [Head, Header, Body, ...header, ...beforeBody, pageBody, ...left, ...right, Footer]
},
- async emit(ctx, content, resources, emit): Promise<FilePath[]> {
+ async getDependencyGraph(ctx, content, _resources) {
+ // Example graph:
+ // nested/file.md --> nested/file.html
+ // \-------> nested/index.html
+ // TODO implement
+ return new DepGraph<FilePath>()
+ },
+ async emit(ctx, content, resources): Promise<FilePath[]> {
const fps: FilePath[] = []
const allFiles = content.map((c) => c[1].data)
const cfg = ctx.cfg.configuration
@@ -56,7 +66,10 @@
folder,
defaultProcessedContent({
slug: joinSegments(folder, "index") as FullSlug,
- frontmatter: { title: `Folder: ${folder}`, tags: [] },
+ frontmatter: {
+ title: `${i18n(cfg.locale).pages.folderContent.folder}: ${folder}`,
+ tags: [],
+ },
}),
]),
)
@@ -81,8 +94,9 @@
allFiles,
}
- const content = renderPage(slug, componentData, opts, externalResources)
- const fp = await emit({
+ const content = renderPage(cfg, slug, componentData, opts, externalResources)
+ const fp = await write({
+ ctx,
content,
slug,
ext: ".html",
--
Gitblit v1.10.0