From e59093507c09a36a206989141c7f2abf10df9294 Mon Sep 17 00:00:00 2001 From: liuyib <1656081615@qq.com> Date: Mon, 6 May 2024 13:17:34 +0530 Subject: [PATCH] fix: demo i18n --- src/assetParsers/block.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/assetParsers/block.ts b/src/assetParsers/block.ts index e9e63a71a..2b51a4619 100644 --- a/src/assetParsers/block.ts +++ b/src/assetParsers/block.ts @@ -169,8 +169,9 @@ async function parseBlockAsset(opts: { // support locale prefix for title & description ['description', 'title'].forEach((key) => { - frontmatter[key] ||= - frontmatter[`${key}.${opts.fileLocale}`]; + frontmatter[key] = + frontmatter[`${key}.${opts.fileLocale}`] || + frontmatter[key]; }); result.frontmatter = frontmatter;