From c8ae52ee0fe57ef343998bd58b124aa7ec72e302 Mon Sep 17 00:00:00 2001 From: Felix Nie Date: Mon, 17 Mar 2025 02:41:18 +0800 Subject: [PATCH] Added a separate title font configuration --- quartz.config.ts | 1 + quartz/util/theme.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/quartz.config.ts b/quartz.config.ts index f54060908..3de01821a 100644 --- a/quartz.config.ts +++ b/quartz.config.ts @@ -23,6 +23,7 @@ const config: QuartzConfig = { fontOrigin: "googleFonts", cdnCaching: true, typography: { + title: "Playwrite US Trad", header: "Schibsted Grotesk", body: "Source Sans Pro", code: "IBM Plex Mono", diff --git a/quartz/util/theme.ts b/quartz/util/theme.ts index 56261e35b..14262e3e4 100644 --- a/quartz/util/theme.ts +++ b/quartz/util/theme.ts @@ -25,6 +25,7 @@ export type FontSpecification = export interface Theme { typography: { + title: FontSpecification header: FontSpecification body: FontSpecification code: FontSpecification @@ -48,7 +49,7 @@ export function getFontSpecificationName(spec: FontSpecification): string { return spec.name } -function formatFontSpecification(type: "header" | "body" | "code", spec: FontSpecification) { +function formatFontSpecification(type: "title" | "header" | "body" | "code", spec: FontSpecification) { if (typeof spec === "string") { spec = { name: spec } }