fix: set default locale for lang attribute

This commit is contained in:
Jacky Zhao 2024-02-08 09:31:36 -08:00
parent fd785ada56
commit a87704cd05
2 changed files with 3 additions and 3 deletions
quartz/components

View file

@ -209,8 +209,7 @@ export function renderPage(
</div>
)
const lang = componentData.frontmatter?.lang ?? cfg.locale.split("-")[0]
const lang = componentData.frontmatter?.lang ?? cfg.locale?.split("-")[0] ?? "en"
const doc = (
<html lang={lang}>
<Head {...componentData} />