test(ci): add exporter heading levels and a11y typography smoke; update MAIN_PLAN

This commit is contained in:
2025-11-14 16:40:45 +09:00
parent aaa624a046
commit a9bbc357e7
92 changed files with 8370 additions and 13 deletions
+32
View File
@@ -0,0 +1,32 @@
import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'
import { locales, defaultLocale } from '@/lib/i18n/locales'
function hasLocale(pathname: string) {
const first = pathname.split('/')[1]
return (locales as readonly string[]).includes(first)
}
export default function proxy(request: NextRequest) {
const { pathname } = request.nextUrl
// Ignore next internals and assets
if (
pathname.startsWith('/_next') ||
pathname.startsWith('/api') ||
pathname.includes('.') // static files
) {
return
}
// Add default locale if missing
if (!hasLocale(pathname)) {
const url = request.nextUrl.clone()
url.pathname = `/${defaultLocale}${pathname}`
return NextResponse.redirect(url)
}
}
export const config = {
matcher: ['/((?!_next|.*\..*).*)'],
}