diff --git a/quartz/components/renderPage.tsx b/quartz/components/renderPage.tsx index 7a97edbc..0c185444 100644 --- a/quartz/components/renderPage.tsx +++ b/quartz/components/renderPage.tsx @@ -209,7 +209,7 @@ export function renderPage( ) - const lang = componentData.frontmatter?.lang ?? cfg.locale?.split("-")[0] ?? "en" + const lang = componentData.fileData.frontmatter?.lang ?? cfg.locale?.split("-")[0] ?? "en" const doc = ( diff --git a/quartz/plugins/transformers/frontmatter.ts b/quartz/plugins/transformers/frontmatter.ts index 79aa5f31..5ab239a3 100644 --- a/quartz/plugins/transformers/frontmatter.ts +++ b/quartz/plugins/transformers/frontmatter.ts @@ -90,6 +90,7 @@ declare module "vfile" { description: string publish: boolean draft: boolean + lang: string enableToc: string cssclasses: string[] }>