From fea352849c6972da4b3b8935eb2e86f6cefc76ed Mon Sep 17 00:00:00 2001
From: Ben Schlegel <ben5.schlegel@gmail.com>
Date: Sat, 16 Sep 2023 17:45:21 +0000
Subject: [PATCH] fix: create deep copy of file passed into tree
---
quartz/components/PageTitle.tsx | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/quartz/components/PageTitle.tsx b/quartz/components/PageTitle.tsx
index 00b2300..c327547 100644
--- a/quartz/components/PageTitle.tsx
+++ b/quartz/components/PageTitle.tsx
@@ -1,11 +1,14 @@
-import { canonicalizeServer, pathToRoot } from "../path"
+import { pathToRoot } from "../util/path"
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
function PageTitle({ fileData, cfg }: QuartzComponentProps) {
const title = cfg?.pageTitle ?? "Untitled Quartz"
- const slug = canonicalizeServer(fileData.slug!)
- const baseDir = pathToRoot(slug)
- return <h1 class="page-title"><a href={baseDir}>{title}</a></h1>
+ const baseDir = pathToRoot(fileData.slug!)
+ return (
+ <h1 class="page-title">
+ <a href={baseDir}>{title}</a>
+ </h1>
+ )
}
PageTitle.css = `
--
Gitblit v1.10.0