mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 13:24:05 -06:00
Dealing with empty and undefined title
This commit is contained in:
parent
866572444e
commit
668809f4c5
@ -84,7 +84,7 @@ function formatFontSpecification(type: "title" | "header" | "body" | "code", spe
|
||||
|
||||
export function googleFontHref(theme: Theme, text: string): string[] {
|
||||
const { header, body, code } = theme.typography
|
||||
const title = (theme.typography.title || undefined) ?? header
|
||||
const title = theme.typography.title || header
|
||||
|
||||
const titleFont = formatFontSpecification("title", title)
|
||||
const headerFont = formatFontSpecification("header", header)
|
||||
@ -147,7 +147,7 @@ ${stylesheet.join("\n\n")}
|
||||
--highlight: ${theme.colors.lightMode.highlight};
|
||||
--textHighlight: ${theme.colors.lightMode.textHighlight};
|
||||
|
||||
--titleFont: "${getFontSpecificationName(theme.typography.title)}", ${DEFAULT_SANS_SERIF};
|
||||
--titleFont: "${getFontSpecificationName(theme.typography.title || theme.typography.header)}", ${DEFAULT_SANS_SERIF};
|
||||
--headerFont: "${getFontSpecificationName(theme.typography.header)}", ${DEFAULT_SANS_SERIF};
|
||||
--bodyFont: "${getFontSpecificationName(theme.typography.body)}", ${DEFAULT_SANS_SERIF};
|
||||
--codeFont: "${getFontSpecificationName(theme.typography.code)}", ${DEFAULT_MONO};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user