-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnext.config.js
More file actions
75 lines (73 loc) · 3.42 KB
/
Copy pathnext.config.js
File metadata and controls
75 lines (73 loc) · 3.42 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
// Vercel's Next.js builder expects the default `.next` output directory
// (it looks there for routes-manifest.json). The custom `build` dir is only
// needed for the self-hosted Azure deploy, whose workflow zips from
// build/standalone and build/static. VERCEL is set during Vercel builds.
distDir: process.env.VERCEL ? '.next' : 'build',
output: 'standalone',
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'kcesar.org',
port: '',
},
{
protocol: 'https',
hostname: 'mptrswa.com',
port: '',
},
{
protocol: 'https',
hostname: 'picsum.photos',
port: '',
}
],
},
async redirects() {
const permanent = {
'/donate.aspx': '/donate',
'/donate.html': '/donate',
'/join': '/join-us',
'/schedule.aspx': '/join-us',
'/training.aspx': '/join-us',
'/recruiting.aspx': '/join-us',
'/recruiting.html': '/join-us',
'/members': 'https://accounts.google.com/AccountChooser?continue=https://sites.google.com/kcesar.org/members',
'/sartopo': 'https://caltopo.com',
'/database': 'https://kcsara.d4h.org',
'/rig.html': '/rig',
'/slack': 'https://kingcountyesar.slack.com/',
'/parent-packet': '/assets/doc/ESAR_Parent_Packet.pdf',
// Supplemental Mapwork moved under Training Materials so the URL matches
// the site hierarchy. /mapwork was linked from training emails, so it
// needs to keep working.
'/mapwork': '/join-us/training-materials/mapwork',
};
const temp = {
'/apply': '/join-us',
'/cert': 'https://docs.google.com/forms/d/e/1FAIpQLSctsjL6JfUxsQNoUiqJeZqADig1N4KlY43VJr0sy25q9lNK-g/viewform',
'/paging-setup': 'https://docs.google.com/forms/d/e/1FAIpQLSfRjUxFUCaQBQ9Xu4ojowPj9NVdyoQYFJBAL5MSnc4IqWmDhQ/viewform',
// Unit-managed short link; resolves to the current season's SignUpGenius
// sign-up so the target can change without a site deploy.
'/course-a-registration': 'https://tinyurl.com/KCESARCourseA',
'/admin-hours': 'https://docs.google.com/forms/d/e/1FAIpQLSeU53MJ5PBhq-7sp2l6ER5R5attix_ApgOV9EtH03R55aANYw/viewform',
'/elections': 'https://docs.google.com/forms/d/e/1FAIpQLSdv3DlIg4oGbAoROVfdS4WcV_b_RKAwIQcEP4BaexBISV4vQg/viewform',
'/rig': 'https://docs.google.com/forms/d/e/1FAIpQLSck1SruL9W8_RSLvpFRblAW02pFybIEhKaIvH_ZhxW-FxEbnA/viewform',
'/feedback': 'https://docs.google.com/forms/d/e/1FAIpQLSdCl1jZM3jW5oUl2fwdrakBEJZz6my0qiVxuXAtQ7KH-EZF1Q/viewform?usp=dialog',
'/assets/doc/Parent_Packet_2025_Final.pdf': '/assets/doc/ESAR_Parent_Packet.pdf',
'/assets/doc/ESAR_Parent_Packet_2019.pdf': '/assets/doc/ESAR_Parent_Packet.pdf',
// The 2023 annual report was removed from the site; catch old links.
'/kcesar/annual-report/2023-annual-report.pdf': '/about',
};
return [
...Object.entries(permanent)
.map(([source, destination]) => ({ source, destination, permanent: true })),
...Object.entries(temp)
.map(([source, destination]) => ({ source, destination, permanent: false })),
]
}
}
module.exports = nextConfig;