diff --git a/next.config.js b/next.config.js index e7bf37c7..27766e52 100755 --- a/next.config.js +++ b/next.config.js @@ -9,6 +9,108 @@ module.exports = withMDX({ if (isServer) require('./lib/sitemap') return config }, + async redirects() { + return [ + { source: '/clubs/', destination: '/', permanent: false }, + { source: '/c9/', destination: '/cloud9_setup/' }, + { source: '/slack_invite/', destination: '/slack/' }, + { source: '/workshops/slack/', destination: '/slack/' }, + { source: '/community/', destination: '/slack/' }, + { source: '/hack_camp/', destination: '/camp/' }, + { source: '/repl/', destination: '/' }, + { source: '/coc/', destination: '/conduct/' }, + { source: '/code_of_conduct/', destination: '/conduct/' }, + { source: '/branding/', destination: '/brand/' }, + { source: '/ama/', destination: '/amas/' }, + { source: '/finder/', destination: 'https://finder.hackclub.com' }, + { source: '/apply/', destination: 'https://apply.hackclub.com' }, + { source: '/icons/', destination: 'https://icons.hackclub.com' }, + { + source: '/updates/', + destination: + 'https://www.youtube.com/playlist?list=PLbNbddgD-XxEC5-_KQTye6nFPBLtI_mds' + }, + { + source: '/admin/', + destination: + 'https://5c8804a629a378000833619c--hackclub.netlify.com/admin/' + }, + { + source: '/checkup/', + destination: + 'https://5c8804a629a378000833619c--hackclub.netlify.com/checkup/', + statusCode: 302 + }, + { + source: '/workshops/', + destination: 'https://workshops.hackclub.com/' + }, + { + source: '/workshops/([a-z_]+)/', + destination: 'https://workshops.hackclub.com/$1/' + } + ] + }, + async rewrites() { + return [ + { + source: '/v3/_next/:path*', + destination: '/_next/:path*' + }, + { + source: '/workshops/_next/:path*', + destination: 'https://workshops.hackclub.com/_next/:path*' + }, + { + source: '/summer/_next/:path*', + destination: 'https://summer.hackclub.com/_next/:path*' + }, + { + source: '/sponsorship/', + destination: 'https://workshops.hackclub.com/sponsorship/' + }, + { + source: '/covid19/', + destination: 'https://workshops.hackclub.com/covid19/' + }, + { + source: '/sunsetting-som/', + destination: 'https://workshops.hackclub.com/sunsetting-som/' + }, + { + source: '/banner/', + destination: 'https://workshops.hackclub.com/banner/' + }, + { + source: '/conduct/', + destination: 'https://workshops.hackclub.com/conduct/' + }, + { + source: '/workshop-bounty/', + destination: 'https://workshops.hackclub.com/workshop-bounty/' + }, + { + source: '/vip-newsletters/', + destination: 'https://workshops.hackclub.com/vip-newsletters/' + }, + { + source: '/vip-newsletters/(.*)', + destination: 'https://workshops.hackclub.com/vip-newsletters/$1' + }, + { + source: '/transparency/may-2020/', + destination: 'https://workshops.hackclub.com/transparency-may/' + }, + { + source: '/map/', + destination: 'https://map.hackclub.dev/' + }, + { + source: '/(.*)', + destination: 'https://site.hackclub.dev/$1' + } + ] + }, async headers() { return [ { diff --git a/vercel.json b/vercel.json index f6f5212c..67c0c24d 100644 --- a/vercel.json +++ b/vercel.json @@ -1,102 +1,6 @@ { - "github": { "silent": true }, "env": { "SLACK_BOT_TOKEN": "@slack-bot-token-production-8avf" }, - "redirects": [ - { "source": "/clubs/", "destination": "/", "permanent": false }, - { "source": "/c9/", "destination": "/cloud9_setup/" }, - { "source": "/slack_invite/", "destination": "/slack/" }, - { "source": "/workshops/slack/", "destination": "/slack/" }, - { "source": "/community/", "destination": "/slack/" }, - { "source": "/hack_camp/", "destination": "/camp/" }, - { "source": "/repl/", "destination": "/" }, - { "source": "/coc/", "destination": "/conduct/" }, - { "source": "/code_of_conduct/", "destination": "/conduct/" }, - { "source": "/branding/", "destination": "/brand/" }, - { "source": "/ama/", "destination": "/amas/" }, - { "source": "/finder/", "destination": "https://finder.hackclub.com" }, - { "source": "/apply/", "destination": "https://apply.hackclub.com" }, - { "source": "/icons/", "destination": "https://icons.hackclub.com" }, - { - "source": "/updates/", - "destination": "https://www.youtube.com/playlist?list=PLbNbddgD-XxEC5-_KQTye6nFPBLtI_mds" - }, - { - "source": "/admin/", - "destination": "https://5c8804a629a378000833619c--hackclub.netlify.com/admin/" - }, - { - "source": "/checkup/", - "destination": "https://5c8804a629a378000833619c--hackclub.netlify.com/checkup/", - "statusCode": 302 - }, - { - "source": "/workshops/", - "destination": "https://workshops.hackclub.com/" - }, - { - "source": "/workshops/([a-z_]+)/", - "destination": "https://workshops.hackclub.com/$1/" - } - ], - "rewrites": [ - { - "source": "/v3/_next/:path*", - "destination": "/_next/:path*" - }, - { - "source": "/workshops/_next/:path*", - "destination": "https://workshops.hackclub.com/_next/:path*" - }, - { - "source": "/summer/_next/:path*", - "destination": "https://summer.hackclub.com/_next/:path*" - }, - { - "source": "/sponsorship/", - "destination": "https://workshops.hackclub.com/sponsorship/" - }, - { - "source": "/covid19/", - "destination": "https://workshops.hackclub.com/covid19/" - }, - { - "source": "/sunsetting-som/", - "destination": "https://workshops.hackclub.com/sunsetting-som/" - }, - { - "source": "/banner/", - "destination": "https://workshops.hackclub.com/banner/" - }, - { - "source": "/conduct/", - "destination": "https://workshops.hackclub.com/conduct/" - }, - { - "source": "/workshop-bounty/", - "destination": "https://workshops.hackclub.com/workshop-bounty/" - }, - { - "source": "/vip-newsletters/", - "destination": "https://workshops.hackclub.com/vip-newsletters/" - }, - { - "source": "/vip-newsletters/(.*)", - "destination": "https://workshops.hackclub.com/vip-newsletters/$1" - }, - { - "source": "/transparency/may-2020/", - "destination": "https://workshops.hackclub.com/transparency-may/" - }, - { - "source": "/map/", - "destination": "https://map.hackclub.dev/" - }, - { - "source": "/(.*)", - "destination": "https://site.hackclub.dev/$1" - } - ], "github": { "silent": true } }