Files
nocobase/docs/theme/utils.ts
T
2025-10-30 17:35:08 +08:00

7 lines
174 B
TypeScript

export function transformHref(href: string, lang: string) {
if (href.startsWith('/') && !href.startsWith(`/${lang}/`)) {
return `/${lang}${href}`;
}
return href;
}