From a53772bbd1dd2804872ae0e519bedeb2a2fd4287 Mon Sep 17 00:00:00 2001
From: Osman Tunahan ARIKAN <154083945+OsmanTunahan@users.noreply.github.com>
Date: Wed, 30 Oct 2024 22:33:22 +0000
Subject: [PATCH] feat(i18n): add turkish language (#1554)

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

diff --git a/quartz/components/PageTitle.tsx b/quartz/components/PageTitle.tsx
index f6319ef..046dc52 100644
--- a/quartz/components/PageTitle.tsx
+++ b/quartz/components/PageTitle.tsx
@@ -1,19 +1,21 @@
-import { canonicalizeServer, pathToRoot } from "../path"
-import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
+import { pathToRoot } from "../util/path"
+import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
+import { classNames } from "../util/lang"
+import { i18n } from "../i18n"
 
-function PageTitle({ fileData, cfg }: QuartzComponentProps) {
-  const title = cfg?.pageTitle ?? "Untitled Quartz"
-  const slug = canonicalizeServer(fileData.slug!)
-  const baseDir = pathToRoot(slug)
+const PageTitle: QuartzComponent = ({ fileData, cfg, displayClass }: QuartzComponentProps) => {
+  const title = cfg?.pageTitle ?? i18n(cfg.locale).propertyDefaults.title
+  const baseDir = pathToRoot(fileData.slug!)
   return (
-    <h1 class="page-title">
+    <h2 class={classNames(displayClass, "page-title")}>
       <a href={baseDir}>{title}</a>
-    </h1>
+    </h2>
   )
 }
 
 PageTitle.css = `
 .page-title {
+  font-size: 1.75rem;
   margin: 0;
 }
 `

--
Gitblit v1.10.0