Skip to content

Commit 3ba1de2

Browse files
GeneAIGeneAI
authored andcommitted
fix: Add redirect to ensure trailing slash for framework-docs CSS paths
1 parent 7832acb commit 3ba1de2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

website/next.config.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,23 @@ const nextConfig: NextConfig = {
1111
// Ignore ESLint errors during production builds
1212
ignoreDuringBuilds: true,
1313
},
14+
async redirects() {
15+
return [
16+
// Redirect framework-docs paths without trailing slash to include trailing slash
17+
{
18+
source: '/framework-docs/:path((?!.*\\.).+)',
19+
destination: '/framework-docs/:path/',
20+
permanent: true,
21+
},
22+
];
23+
},
1424
async rewrites() {
1525
return [
1626
// Serve index.html for framework-docs directory requests
1727
{
1828
source: '/framework-docs/:path*/',
1929
destination: '/framework-docs/:path*/index.html',
2030
},
21-
{
22-
source: '/framework-docs/:path((?!.*\\.).*)',
23-
destination: '/framework-docs/:path/index.html',
24-
},
2531
];
2632
},
2733
};

0 commit comments

Comments
 (0)