From e82ba97a396e4e9d77486b48e6ee8b1dfd1c1b4c Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 24 Jul 2023 07:07:58 +0000
Subject: [PATCH] actually add processed tag to frontmatter
---
quartz/components/PageTitle.tsx | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/quartz/components/PageTitle.tsx b/quartz/components/PageTitle.tsx
index 15cd4e4..f6319ef 100644
--- a/quartz/components/PageTitle.tsx
+++ b/quartz/components/PageTitle.tsx
@@ -1,11 +1,15 @@
-import { resolveToRoot } from "../path"
+import { canonicalizeServer, pathToRoot } from "../path"
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
function PageTitle({ fileData, cfg }: QuartzComponentProps) {
const title = cfg?.pageTitle ?? "Untitled Quartz"
- const slug = fileData.slug!
- const baseDir = resolveToRoot(slug)
- return <h1 class="page-title"><a href={baseDir}>{title}</a></h1>
+ const slug = canonicalizeServer(fileData.slug!)
+ const baseDir = pathToRoot(slug)
+ return (
+ <h1 class="page-title">
+ <a href={baseDir}>{title}</a>
+ </h1>
+ )
}
PageTitle.css = `
--
Gitblit v1.10.0