diff --git a/theme/src/node/autoFrontmatter/resolveOptions.ts b/theme/src/node/autoFrontmatter/resolveOptions.ts index 3b47f548..1d7477a8 100644 --- a/theme/src/node/autoFrontmatter/resolveOptions.ts +++ b/theme/src/node/autoFrontmatter/resolveOptions.ts @@ -147,7 +147,7 @@ export function resolveOptions( const note = findNote(relativePath) const prefix = notes?.link || '' const args: string[] = [ - locale, + prefix.startsWith(locale) ? '/' : locale, prefix, note?.link || '', ] diff --git a/theme/src/node/theme.ts b/theme/src/node/theme.ts index e7834a72..c56c62c4 100644 --- a/theme/src/node/theme.ts +++ b/theme/src/node/theme.ts @@ -78,6 +78,7 @@ export function plumeTheme(options: PlumeThemeOptions = {}): Theme { await prepareData(app) }) const { localeOptions } = await waitForConfigLoaded() + await waitForAutoFrontmatter() await prepareThemeData(app, localeOptions) await prepareData(app) },