Skip to content

Commit

Permalink
chore: migrate the redirects for Vercel (#3661)
Browse files Browse the repository at this point in the history
* chore: migrate the redirects for Vercel

* chore: correct the redirects format
  • Loading branch information
SiTaggart authored Dec 8, 2023
1 parent 91fe830 commit 43b600c
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions packages/paste-website/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,46 @@ const nextConfig = {
compiler: {
emotion: true,
},
// https://vercel.com/docs/edge-network/redirects#configuration-redirects
async redirects() {
return [
{
source: "/getting-started/design",
destination: "/introduction/for-designers/design-guidelines",
permanent: true,
},
{
source: "/getting-started/engineering",
destination: "/introduction/for-engineers/quickstart",
permanent: true,
},
{
source: "/getting-started/manual-installation",
destination: "/introduction/for-engineers/manual-installation",
permanent: true,
},
{ source: "/icons/how-to-add-an-icon", destination: "/introduction/contributing/icons", permanent: true },
{ source: "/patterns/contribute", destination: "/introduction/contributing/patterns", permanent: true },
{ source: "/principles", destination: "/introduction/about-paste", permanent: true },
{ source: "/getting-started/faqs", destination: "/introduction/about-paste", permanent: true },
{ source: "/getting-started/working-guide", destination: "/introduction/working-with-us", permanent: true },
{ source: "/content/:path*", destination: "/foundations/content/:path*", permanent: true },
{ source: "/illustrations", destination: "/foundations/illustrations", permanent: true },
{ source: "/icons/:path*", destination: "/components/icon/:path*", permanent: true },
{ source: "/components/icons/:path*", destination: "/components/icon/:path*", permanent: true },
{ source: "/layout/:path*", destination: "/components/:path*", permanent: true },
{ source: "/libraries/:path*", destination: "/core/libraries/:path*", permanent: true },
{ source: "/core/theme-package", destination: "/theme/", permanent: true },
{ source: "/tokens/theme-package", destination: "/theme/", permanent: true },
{ source: "/core/changing-theme", destination: "/theme/changing-theme", permanent: true },
{
source: "/tokens/how-to-compose-custom-ui-with-tokens",
destination: "/customization/composing-custom-components-with-design-tokens",
permanent: true,
},
{ source: "/articles", destination: "/blog", permanent: true },
];
},
// https://nextjs.org/docs/pages/api-reference/next-config-js/headers
async headers() {
return [
Expand Down

1 comment on commit 43b600c

@vercel
Copy link

@vercel vercel bot commented on 43b600c Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.