Skip to content

Commit

Permalink
fix: demo localized title and description not working bug (#2101)
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyib committed May 6, 2024
1 parent a8b3c64 commit 77f1f07
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/assetParsers/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 77f1f07

Please sign in to comment.