From cbeef5541f7eba9d3de0131c27bf3a619bf8e55b Mon Sep 17 00:00:00 2001
From: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun, 10 Nov 2024 09:46:01 +0000
Subject: [PATCH] chore(deps-dev): bump @types/node from 22.8.7 to 22.9.0 in the production-dependencies group (#1579)
---
quartz/components/Head.tsx | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/quartz/components/Head.tsx b/quartz/components/Head.tsx
index 7b9815c..cf79434 100644
--- a/quartz/components/Head.tsx
+++ b/quartz/components/Head.tsx
@@ -1,13 +1,14 @@
import { i18n } from "../i18n"
import { FullSlug, joinSegments, pathToRoot } from "../util/path"
-import { JSResourceToScriptElement } from "../util/resources"
+import { CSSResourceToStyleElement, JSResourceToScriptElement } from "../util/resources"
import { googleFontHref } from "../util/theme"
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
export default (() => {
const Head: QuartzComponent = ({ cfg, fileData, externalResources }: QuartzComponentProps) => {
+ const titleSuffix = cfg.pageTitleSuffix ?? ""
const title =
- (fileData.frontmatter?.title ?? i18n(cfg.locale).propertyDefaults.title) + cfg.pageTitleSuffix
+ (fileData.frontmatter?.title ?? i18n(cfg.locale).propertyDefaults.title) + titleSuffix
const description =
fileData.description?.trim() ?? i18n(cfg.locale).propertyDefaults.description
const { css, js } = externalResources
@@ -39,9 +40,7 @@
<link rel="icon" href={iconPath} />
<meta name="description" content={description} />
<meta name="generator" content="Quartz" />
- {css.map((href) => (
- <link key={href} href={href} rel="stylesheet" type="text/css" spa-preserve />
- ))}
+ {css.map((resource) => CSSResourceToStyleElement(resource, true))}
{js
.filter((resource) => resource.loadTime === "beforeDOMReady")
.map((res) => JSResourceToScriptElement(res, true))}
--
Gitblit v1.10.0