diff --git a/packages/theme/src/node/plugins.ts b/packages/theme/src/node/plugins.ts index faff9e8a..428a6c2d 100644 --- a/packages/theme/src/node/plugins.ts +++ b/packages/theme/src/node/plugins.ts @@ -39,7 +39,9 @@ export const setupPlugins = ( const localeNotesDirs = Object.keys(locales) .map((locale) => { const dir = locales[locale].notes?.dir || '' - return dir ? path.join(locale, dir, '**').replace(/^\//, '') : '' + return dir + ? path.join(locale, dir, '**').replace(/\\+/g, '/').replace(/^\//, '') + : '' }) .filter(Boolean) diff --git a/packages/theme/src/node/setupPages.ts b/packages/theme/src/node/setupPages.ts index 57c5d402..b1c67042 100644 --- a/packages/theme/src/node/setupPages.ts +++ b/packages/theme/src/node/setupPages.ts @@ -43,7 +43,8 @@ export function autoCategory( const notesLinks: string[] = [] for (const [, locale] of locales.entries()) { const notes = options.locales?.[locale]?.notes - if (notes && notes.link) notesLinks.push(path.join(locale, notes.link)) + if (notes && notes.link) + notesLinks.push(path.join(locale, notes.link).replace(/\\+/g, '/')) } if (notesLinks.some((link) => page.path.startsWith(link))) return const RE_LOCALE = new RegExp(