fix(i18n): make sure to use correct fileData for manual localization (#975)
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
		@@ -209,7 +209,7 @@ export function renderPage(
 | 
				
			|||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  )
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const lang = componentData.frontmatter?.lang ?? cfg.locale?.split("-")[0] ?? "en"
 | 
					  const lang = componentData.fileData.frontmatter?.lang ?? cfg.locale?.split("-")[0] ?? "en"
 | 
				
			||||||
  const doc = (
 | 
					  const doc = (
 | 
				
			||||||
    <html lang={lang}>
 | 
					    <html lang={lang}>
 | 
				
			||||||
      <Head {...componentData} />
 | 
					      <Head {...componentData} />
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -90,6 +90,7 @@ declare module "vfile" {
 | 
				
			|||||||
        description: string
 | 
					        description: string
 | 
				
			||||||
        publish: boolean
 | 
					        publish: boolean
 | 
				
			||||||
        draft: boolean
 | 
					        draft: boolean
 | 
				
			||||||
 | 
					        lang: string
 | 
				
			||||||
        enableToc: string
 | 
					        enableToc: string
 | 
				
			||||||
        cssclasses: string[]
 | 
					        cssclasses: string[]
 | 
				
			||||||
      }>
 | 
					      }>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user