diff --git a/quartz/plugins/emitters/componentResources.ts b/quartz/plugins/emitters/componentResources.ts index ff7bf9cd2..5dd67e6aa 100644 --- a/quartz/plugins/emitters/componentResources.ts +++ b/quartz/plugins/emitters/componentResources.ts @@ -9,7 +9,12 @@ import styles from "../../styles/custom.scss" import popoverStyle from "../../components/styles/popover.scss" import { BuildCtx } from "../../util/ctx" import { QuartzComponent } from "../../components/types" -import { googleFontHref, googleFontSubsetHref, joinStyles, processGoogleFonts } from "../../util/theme" +import { + googleFontHref, + googleFontSubsetHref, + joinStyles, + processGoogleFonts, +} from "../../util/theme" import { Features, transform } from "lightningcss" import { transform as transpile } from "esbuild" import { write } from "./helpers" @@ -214,7 +219,7 @@ export const ComponentResources: QuartzEmitterPlugin = () => { const theme = ctx.cfg.configuration.theme const response = await fetch(googleFontHref(theme)) googleFontsStyleSheet = await response.text() - + if (theme.typography.title) { const title = ctx.cfg.configuration.pageTitle const response = await fetch(googleFontSubsetHref(theme, title)) diff --git a/quartz/util/theme.ts b/quartz/util/theme.ts index 9f319f0dd..4a064255f 100644 --- a/quartz/util/theme.ts +++ b/quartz/util/theme.ts @@ -49,7 +49,10 @@ export function getFontSpecificationName(spec: FontSpecification): string { return spec.name } -function formatFontSpecification(type: "title" | "header" | "body" | "code", spec: FontSpecification) { +function formatFontSpecification( + type: "title" | "header" | "body" | "code", + spec: FontSpecification, +) { if (typeof spec === "string") { spec = { name: spec } }