From 2bfe90b7e64839d8ec6319fe93b76472b0285114 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 12 Jun 2023 06:46:38 +0000
Subject: [PATCH] add config to components

---
 quartz/components/Head.tsx |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/quartz/components/Head.tsx b/quartz/components/Head.tsx
index 37c0aba..16125da 100644
--- a/quartz/components/Head.tsx
+++ b/quartz/components/Head.tsx
@@ -1,7 +1,7 @@
 import { resolveToRoot } from "../path"
-import { QuartzComponentProps } from "./types"
+import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
 
-export default function Head({ fileData, externalResources }: QuartzComponentProps) {
+function Head({ fileData, externalResources }: QuartzComponentProps) {
   const slug = fileData.slug!
   const title = fileData.frontmatter?.title ?? "Untitled"
   const description = fileData.description ?? "No description provided"
@@ -9,7 +9,7 @@
   const baseDir = resolveToRoot(slug)
   const iconPath = baseDir + "/static/icon.png"
   const ogImagePath = baseDir + "/static/og-image.png"
-  
+
   return <head>
     <title>{title}</title>
     <meta charSet="utf-8" />
@@ -28,3 +28,5 @@
     {js.filter(resource => resource.loadTime === "beforeDOMReady").map(resource => <script key={resource.src} {...resource} spa-preserve />)}
   </head>
 }
+
+export default (() => Head) satisfies QuartzComponentConstructor

--
Gitblit v1.10.0