From b37de621217675f8872f5be0c7e4a5b2b557fbe5 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Tue, 27 Aug 2024 10:44:31 +0800 Subject: [PATCH] fix(theme): incorrect generate for notes permalink --- theme/src/node/autoFrontmatter/resolveOptions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme/src/node/autoFrontmatter/resolveOptions.ts b/theme/src/node/autoFrontmatter/resolveOptions.ts index 1d7477a8..a1814857 100644 --- a/theme/src/node/autoFrontmatter/resolveOptions.ts +++ b/theme/src/node/autoFrontmatter/resolveOptions.ts @@ -104,7 +104,7 @@ export function resolveOptions( const prefix = notesByLocale(locale)?.link || '' const note = findNote(relativePath) return pathJoin( - locale, + prefix.startsWith(locale) ? '/' : locale, prefix, note?.link || getCurrentDirname(note?.dir, relativePath), '/',