mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-17 12:01:33 +02:00
feat: enhance internationalization support with dynamic routing
This commit is contained in:
parent
d6c98880d3
commit
8c19d26cfd
12 changed files with 199 additions and 87 deletions
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
import { themeConfig } from '@/config'
|
||||
import Layout from '@/layouts/Layout.astro'
|
||||
import { getPinnedPosts, getPosts } from '@/utils/content.config'
|
||||
|
||||
export function getStaticPaths() {
|
||||
return [
|
||||
{ params: { lang: 'zh' } },
|
||||
{ params: { lang: 'en' } },
|
||||
]
|
||||
return themeConfig.global.moreLocale.map(lang => ({
|
||||
params: { lang },
|
||||
}))
|
||||
}
|
||||
|
||||
const { lang } = Astro.params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue