Skip to content

Commit

Permalink
fix(i18n): make sure to use correct fileData for manual localization (j…
Browse files Browse the repository at this point in the history
…ackyzha0#975)

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
  • Loading branch information
aarnphm authored Mar 8, 2024
1 parent 6d59aa8 commit b30a200
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion quartz/components/renderPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export function renderPage(
</div>
)

const lang = componentData.frontmatter?.lang ?? cfg.locale?.split("-")[0] ?? "en"
const lang = componentData.fileData.frontmatter?.lang ?? cfg.locale?.split("-")[0] ?? "en"
const doc = (
<html lang={lang}>
<Head {...componentData} />
Expand Down
1 change: 1 addition & 0 deletions quartz/plugins/transformers/frontmatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ declare module "vfile" {
description: string
publish: boolean
draft: boolean
lang: string
enableToc: string
cssclasses: string[]
}>
Expand Down

0 comments on commit b30a200

Please sign in to comment.