You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(docs): extract BASE_PATH constant and improve locale redirect
- Extract BASE_PATH as single source of truth for all path references
- Add LOCALE_MAP for extensible language-to-locale mapping
- Generate redirect script dynamically, eliminating hardcoded paths
- Handle navigator.language being null/undefined
- Preserve query parameters during redirect
- Restore link: '/en/' for proper VitePress language switching
- Use BASE_PATH in favicon and og:image URLs
Benefits:
- Changing base path requires only one edit
- Adding new locales requires only LOCALE_MAP update
- More robust handling of edge cases
0 commit comments