From 08f8e3b4a4879dd7c91c16fbce80c4f2bc5e357f Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 10 Jul 2023 02:32:24 +0000
Subject: [PATCH] docs + various polish

---
 quartz/components/PageTitle.tsx |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/quartz/components/PageTitle.tsx b/quartz/components/PageTitle.tsx
index 080b74d..15cd4e4 100644
--- a/quartz/components/PageTitle.tsx
+++ b/quartz/components/PageTitle.tsx
@@ -1,9 +1,17 @@
 import { resolveToRoot } from "../path"
-import { QuartzComponentProps } from "./types"
+import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
 
-export default function({ cfg, fileData }: QuartzComponentProps) {
-  const title = cfg.siteTitle
+function PageTitle({ fileData, cfg }: QuartzComponentProps) {
+  const title = cfg?.pageTitle ?? "Untitled Quartz"
   const slug = fileData.slug!
   const baseDir = resolveToRoot(slug)
-  return <h1><a href={baseDir}>{title}</a></h1>
+  return <h1 class="page-title"><a href={baseDir}>{title}</a></h1>
 }
+
+PageTitle.css = `
+.page-title {
+  margin: 0;
+}
+`
+
+export default (() => PageTitle) satisfies QuartzComponentConstructor

--
Gitblit v1.10.0