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 | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/quartz/components/Head.tsx b/quartz/components/Head.tsx
index c56b8cb..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"
@@ -24,7 +24,9 @@
<meta name="generator" content="Quartz" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
- {css.map(href => <link key={href} href={href} rel="stylesheet" type="text/css" />)}
- {js.filter(resource => resource.loadTime === "beforeDOMReady").map(resource => <script key={resource.src} {...resource} />)}
+ {css.map(href => <link key={href} href={href} rel="stylesheet" type="text/css" spa-preserve />)}
+ {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