feat: prepare CMS pages for deployment

This commit is contained in:
Codex
2026-04-29 14:23:00 +08:00
parent 9a55b874a5
commit d4fb7e0973
87 changed files with 5153 additions and 1901 deletions
+34 -1
View File
@@ -3,6 +3,8 @@ import createNextIntlPlugin from 'next-intl/plugin'
const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts')
const PUBLIC_PAGE_CACHE_CONTROL = 'public, max-age=0, s-maxage=300, stale-while-revalidate=86400'
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
@@ -29,11 +31,42 @@ const nextConfig = {
// Footer / secondary
{ source: '/Contact/afterservice.html', destination: '/en/support/warranty', permanent: true },
{ source: '/Contact/distributor.html', destination: '/en/dealers', permanent: true },
{ source: '/Contact/distributor.html', destination: '/en/where-to-buy', permanent: true },
{ source: '/Contact/oem.html', destination: '/en/support/contact', permanent: true },
]
},
async headers() {
return [
{
source: '/:locale(en|zh)',
headers: [
{
key: 'Cache-Control',
value: PUBLIC_PAGE_CACHE_CONTROL,
},
],
},
{
source: '/:locale(en|zh)/:path*',
headers: [
{
key: 'Cache-Control',
value: PUBLIC_PAGE_CACHE_CONTROL,
},
],
},
{
source: '/sitemap.xml',
headers: [
{
key: 'Cache-Control',
value: PUBLIC_PAGE_CACHE_CONTROL,
},
],
},
]
},
}
export default withNextIntl(withPayload(nextConfig))