Skip to content

Commit

Permalink
Fix the missing links. (vercel#2707)
Browse files Browse the repository at this point in the history
This PR does three things:
1. Prevents double redirects by setting the correct destination the first time.
2. Redirects URLs accidentally recreated in the new scope. 🤦‍♂️
3. Removes a catch-all to trigger any additional missing links to appear.

Changes are easy to review commit-by-commit.
  • Loading branch information
nathanhammond authored Dec 2, 2022
1 parent b8c0c3c commit eead906
Showing 1 changed file with 44 additions and 26 deletions.
70 changes: 44 additions & 26 deletions docs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,11 @@ const nextConfig = withNextra({
destination: `/repo${route}`,
permanent: true,
})),
{
source: "/repo/docs/getting-started",
destination: "/repo/docs",
permanent: true,
},
{
source: "/docs/getting-started",
destination: "/repo/docs",
permanent: true,
},
{
source: "/repo/docs/guides/workspaces",
destination: "/repo/docs/handbook/workspaces",
permanent: true,
},
{
source: "/usage",
destination: "/repo/docs/reference/command-line-reference",
Expand All @@ -115,21 +105,11 @@ const nextConfig = withNextra({
destination: "/repo/docs/core-concepts/monorepos/running-tasks",
permanent: true,
},
{
source: "/repo/docs/core-concepts/why-turborepo",
destination: "/repo/docs/core-concepts/monorepos",
permanent: true,
},
{
source: "/docs/core-concepts/why-turborepo",
destination: "/repo/docs/core-concepts/monorepos",
permanent: true,
},
{
source: "/repo/docs/core-concepts/filtering",
destination: "/repo/docs/core-concepts/monorepos/filtering",
permanent: true,
},
{
source: "/docs/core-concepts/filtering",
destination: "/repo/docs/core-concepts/monorepos/filtering",
Expand All @@ -145,11 +125,6 @@ const nextConfig = withNextra({
destination: "/repo/docs/handbook/workspaces",
permanent: true,
},
{
source: "/repo/docs/core-concepts/pipelines",
destination: "/repo/docs/core-concepts/monorepos/running-tasks",
permanent: true,
},
{
source: "/docs/core-concepts/pipelines",
destination: "/repo/docs/core-concepts/monorepos/running-tasks",
Expand All @@ -160,7 +135,6 @@ const nextConfig = withNextra({
destination: "/repo/docs/handbook/migrating-to-a-monorepo",
permanent: true,
},

{
source: "/discord{/}?",
permanent: true,
Expand Down Expand Up @@ -192,11 +166,55 @@ const nextConfig = withNextra({
destination: "/repo/docs/ci",
},
{
// Accidentally created, eventually removable. See below.
source: "/repo/docs/core-concepts/running-tasks",
destination: "/repo/docs/core-concepts/monorepos/running-tasks",
permanent: true,
},
{
// Accidentally created, eventually removable. See below.
source: "/repo/docs/core-concepts/why-turborepo",
destination: "/repo/docs/core-concepts/monorepos",
permanent: true,
},
{
// Accidentally created, eventually removable. See below.
source: "/repo/docs/core-concepts/filtering",
destination: "/repo/docs/core-concepts/monorepos/filtering",
permanent: true,
},
{
// Accidentally created, eventually removable. See below.
source: "/repo/docs/core-concepts/pipelines",
destination: "/repo/docs/core-concepts/monorepos/running-tasks",
permanent: true,
},
{
// This rule accidentally created a bunch of URLs.
//
// They've _never_ resolved, so _eventually_ we should be able to remove the
// redirects we added above to fix them.
source: "/docs/features/:path*",
permanent: true,
destination: "/repo/docs/core-concepts/:path*",
},
{
// Accidentally created, eventually removable. See below.
source: "/repo/docs/getting-started",
destination: "/repo/docs",
permanent: true,
},
{
// Accidentally created, eventually removable. See below.
source: "/repo/docs/guides/workspaces",
destination: "/repo/docs/handbook/workspaces",
permanent: true,
},
{
// This rule accidentally created a bunch of URLs.
//
// They've _never_ resolved, so _eventually_ we should be able to remove the
// redirects we added above to fix them.
source: "/docs/:path*",
permanent: true,
destination: "/repo/docs/:path*",
Expand Down

0 comments on commit eead906

Please sign in to comment.