diff --git a/src/components/geek/Keyboard.astro b/src/components/geek/Keyboard.astro index 79d5845..8d693b8 100644 --- a/src/components/geek/Keyboard.astro +++ b/src/components/geek/Keyboard.astro @@ -5,12 +5,14 @@ import { t } from '../../i18n/ui'; import { localeOf } from '../../lib/locale'; const locale = localeOf(Astro.url.pathname); +// g-chords 目标随轨前缀化(en 页 g h → /en/ 而非 /)——C 车道已知边界的补刀 +const pre = locale === 'en' ? '/en' : ''; const routes: Record = { - h: '/', - a: '/archives/', - g: '/gallery/', - m: '/moments/', - b: '/about/', + h: `${pre}/`, + a: `${pre}/archives/`, + g: `${pre}/gallery/`, + m: `${pre}/moments/`, + b: `${pre}/about/`, }; ---