-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnext.config.ts
More file actions
60 lines (58 loc) · 1.83 KB
/
Copy pathnext.config.ts
File metadata and controls
60 lines (58 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import type { NextConfig } from 'next'
const nextConfig: NextConfig = {
trailingSlash: true,
skipTrailingSlashRedirect: true,
images: {
unoptimized: true,
},
async redirects() {
return [
{
source: '/areas/upgrade-economies-governance/:path*',
destination: '/areas/economies-governance/:path*',
permanent: true,
},
{
source: '/areas/upgrade-economies-governance/',
destination: '/areas/economies-governance/',
permanent: true,
},
// Bare opportunity-space list paths -> the area page's on-page anchor.
// These must come before the wildcard redirects below so the empty
// path segment resolves to the anchor rather than the area root.
{
source: '/areas/economies-governance/opportunity-spaces/',
destination: '/areas/economies-governance/#opportunity-spaces',
permanent: true,
},
{
source: '/areas/ai-robotics/opportunity-spaces/',
destination: '/areas/ai-robotics/#opportunity-spaces',
permanent: true,
},
{
source: '/areas/digital-human-rights/opportunity-spaces/',
destination: '/areas/digital-human-rights/#opportunity-spaces',
permanent: true,
},
{
source: '/areas/neurotech/opportunity-spaces/',
destination: '/areas/neurotech/#opportunity-spaces',
permanent: true,
},
// Old individual opportunity-space URLs -> new shortened paths.
// Covers both the detail page and its /edit subpath for every area.
{
source: '/areas/:area/opportunity-spaces/:slug*',
destination: '/areas/:area/:slug*',
permanent: true,
},
{
source: '/research/:path*',
destination: '/insights/:path*',
permanent: true,
},
]
},
}
export default nextConfig