From f1c9ca495e450ecb62dade70c4b60d86e106f79c Mon Sep 17 00:00:00 2001
From: vintro <77507980+vintrocode@users.noreply.github.com>
Date: Mon, 14 Aug 2023 00:19:50 +0000
Subject: [PATCH] docs: note about existing content at same path on different branches

---
 quartz/components/PageTitle.tsx |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/quartz/components/PageTitle.tsx b/quartz/components/PageTitle.tsx
index ea1248f..f6319ef 100644
--- a/quartz/components/PageTitle.tsx
+++ b/quartz/components/PageTitle.tsx
@@ -1,11 +1,15 @@
-import { pathToRoot } 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 slug = canonicalizeServer(fileData.slug!)
   const baseDir = pathToRoot(slug)
-  return <h1 class="page-title"><a href={baseDir}>{title}</a></h1>
+  return (
+    <h1 class="page-title">
+      <a href={baseDir}>{title}</a>
+    </h1>
+  )
 }
 
 PageTitle.css = `

--
Gitblit v1.10.0