mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-17 20:01:33 +02:00
update: unified multilingual page styles
This commit is contained in:
parent
05d3a8034b
commit
91d27dd2ba
14 changed files with 118 additions and 85 deletions
|
@ -3,10 +3,10 @@ import themeConfig from '@/config'
|
|||
import { generateMultiLangPaths } from '@/i18n/route'
|
||||
import { generateRSS } from '@/utils/rss'
|
||||
|
||||
const { moreLocale } = themeConfig.global
|
||||
const { moreLocales } = themeConfig.global
|
||||
|
||||
// Type for supported non-default languages
|
||||
type SupportedLanguage = typeof moreLocale[number]
|
||||
type SupportedLanguage = typeof moreLocales[number]
|
||||
|
||||
// Generate static paths for all supported languages
|
||||
export function getStaticPaths() {
|
||||
|
@ -17,7 +17,7 @@ export async function GET({ params }: APIContext) {
|
|||
const lang = params.lang as SupportedLanguage
|
||||
|
||||
// Return 404 if language is not supported
|
||||
if (!moreLocale.includes(lang)) {
|
||||
if (!moreLocales.includes(lang)) {
|
||||
return new Response(null, {
|
||||
status: 404,
|
||||
statusText: 'Not found',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue