Skip to content

Commit 2a470a3

Browse files
fix: 404 redirects (#2820)
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->
1 parent d0f94ca commit 2a470a3

7 files changed

Lines changed: 48 additions & 78 deletions

File tree

site/next.config.ts

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ const nextConfig = {
2424
},
2525
async redirects() {
2626
return [
27-
// NOTE: Redirects don't work with output: "export"
28-
// Static HTML redirect files are created in public/ instead
27+
// Next.js redirects for Cloudflare deployment
2928

3029
// Convenience Redirects
3130
{
@@ -40,8 +39,7 @@ const nextConfig = {
4039
destination: '/docs/cloud/actors',
4140
permanent: false,
4241
},
43-
// These redirects work in dev but not in static export
44-
// Static HTML files created in public/ instead
42+
// Redirects for moved Cloud docs
4543
{
4644
source: '/docs/hub',
4745
destination: '/docs/cloud/hub',
@@ -170,12 +168,6 @@ const nextConfig = {
170168
permanent: false,
171169
},
172170

173-
// Handle talk-to-an-engineer typo in CSV
174-
{
175-
source: '/talk-to-an-engineer%20/',
176-
destination: '/talk-to-an-engineer',
177-
permanent: false,
178-
},
179171

180172
// Handle specific API variants without trailing slash that may not be caught by :slug* pattern
181173
{
@@ -208,6 +200,48 @@ const nextConfig = {
208200
destination: '/docs/cloud/api/routes/update',
209201
permanent: false,
210202
},
203+
204+
// Additional missing API endpoints
205+
{
206+
source: '/docs/api/actors/get',
207+
destination: '/docs/cloud/api/actors/get',
208+
permanent: false,
209+
},
210+
{
211+
source: '/docs/api/actors/list',
212+
destination: '/docs/cloud/api/actors/list',
213+
permanent: false,
214+
},
215+
{
216+
source: '/docs/api',
217+
destination: '/docs/cloud/api',
218+
permanent: false,
219+
},
220+
221+
// Missing documentation pages
222+
{
223+
source: '/docs/functions',
224+
destination: '/docs/cloud/functions',
225+
permanent: false,
226+
},
227+
{
228+
source: '/docs/containers',
229+
destination: '/docs/cloud/containers',
230+
permanent: false,
231+
},
232+
{
233+
source: '/docs/durability',
234+
destination: '/docs/cloud/durability',
235+
permanent: false,
236+
},
237+
238+
// Discord redirect
239+
{
240+
source: '/discord',
241+
destination: 'https://discord.gg/aXYfyNxYVn',
242+
permanent: false,
243+
},
244+
211245
];
212246
},
213247
webpack: (config) => {

site/public/actors/communicating-with-actors/index.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

site/public/clients/javascript/index.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

site/public/discord/index.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

site/public/talk-to-an-engineer/index.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

site/src/components/Header.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export const Header = forwardRef(function Header(
209209
{/* Social icons */}
210210
{/* <div className='flex gap-1.5'> */}
211211
{[
212-
[faDiscord, "/discord"],
212+
[faDiscord, "https://rivet.gg/discord"],
213213
[faGithub, "https://github.com/rivet-gg/rivet"],
214214
].map(([icon, href]) => (
215215
<Link

site/src/components/v2/Header.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export function Header({
121121
</Link>
122122
</RivetHeader.NavItem>
123123
<RivetHeader.NavItem asChild>
124-
<Link href="/discord">Discord</Link>
124+
<Link href="https://rivet.gg/discord">Discord</Link>
125125
</RivetHeader.NavItem>
126126
<RivetHeader.NavItem asChild>
127127
<Link href="/support">Support</Link>
@@ -136,7 +136,7 @@ export function Header({
136136
className="p-2 mr-4"
137137
>
138138
<Link
139-
href="/discord"
139+
href="https://rivet.gg/discord"
140140
className="text-white/90"
141141
>
142142
<Icon
@@ -233,7 +233,7 @@ export function Header({
233233
<HeaderSearch />
234234
</div>
235235
<RivetHeader.NavItem asChild className="p-2 mr-4">
236-
<Link href="/discord" className="text-white/90">
236+
<Link href="https://rivet.gg/discord" className="text-white/90">
237237
<Icon icon={faDiscord} className="drop-shadow-md" />
238238
</Link>
239239
</RivetHeader.NavItem>

0 commit comments

Comments
 (0)