Added a separate title font configuration

This commit is contained in:
Felix Nie 2025-03-17 02:41:18 +08:00
parent 39d4ea1b00
commit c8ae52ee0f
2 changed files with 3 additions and 1 deletions

View File

@ -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",

View File

@ -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 }
}