mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-17 20:01:33 +02:00
✨ feat: complete language switching functionality and centralized page routing
This commit is contained in:
parent
4651828dd1
commit
05d3a8034b
26 changed files with 253 additions and 146 deletions
|
@ -1,5 +1,6 @@
|
|||
import type { APIContext } from 'astro'
|
||||
import themeConfig from '@/config'
|
||||
import { generateMultiLangPaths } from '@/i18n/route'
|
||||
import { generateRSS } from '@/utils/rss'
|
||||
|
||||
const { moreLocale } = themeConfig.global
|
||||
|
@ -9,7 +10,7 @@ type SupportedLanguage = typeof moreLocale[number]
|
|||
|
||||
// Generate static paths for all supported languages
|
||||
export function getStaticPaths() {
|
||||
return moreLocale.map((lang: SupportedLanguage) => ({ params: { lang } }))
|
||||
return generateMultiLangPaths()
|
||||
}
|
||||
|
||||
export async function GET({ params }: APIContext) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue