We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
localeIndex
1 parent aa29aad commit 5fdd374Copy full SHA for 5fdd374
src/shared/shared.ts
@@ -97,6 +97,7 @@ export function resolveSiteDataByRoute(
97
): SiteData {
98
const localeIndex = getLocaleForPath(siteData, relativePath)
99
const { label, link, ...localeConfig } = siteData.locales[localeIndex] ?? {}
100
+ Object.assign(localeConfig, { localeIndex })
101
const additionalConfigs = resolveAdditionalConfig(siteData, relativePath)
102
if (inBrowser && (import.meta as any).env?.DEV) {
103
;(localeConfig as any)[VP_SOURCE_KEY] = `locale config (${localeIndex})`
0 commit comments