Skip to content

Commit

Permalink
refactor: move discord and github redirects into next configs (#2643)
Browse files Browse the repository at this point in the history
* refactor: move discord and github redirects into next configs

Signed-off-by: Gökay Gürcan <[email protected]>

* fix: swap redirects and rewrites

Signed-off-by: Gökay Gürcan <[email protected]>

* [autofix.ci] apply automated fixes

---------

Signed-off-by: Gökay Gürcan <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Andreas Thomas <[email protected]>
  • Loading branch information
3 people authored Nov 7, 2024
1 parent 9cd5290 commit b39261c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 41 deletions.
5 changes: 0 additions & 5 deletions apps/www/app/discord/page.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions apps/www/app/github/page.tsx

This file was deleted.

70 changes: 39 additions & 31 deletions apps/www/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,45 +23,53 @@ const nextConfig = {
},
];
},
async redirects() {
async rewrites() {
return [
{
source: "/changelog/:slug",
destination: "/changelog#:slug", // Matched parameters can be used in the destination
},
];
},
async redirects() {
return [
{
source: "/docs",
destination: "https://unkey.mintlify.dev/docs",
permanent: true,
},
{
source: "/docs/:match*",
destination: "https://unkey.mintlify.dev/docs/:match*",
permanent: true,
},
{
source: "/engineering",
destination: "https://unkey-engineering.mintlify.dev/engineering",
permanent: true,
},
{
source: "/engineering/:match*",
destination: "https://unkey-engineering.mintlify.dev/engineering/:match*",
permanent: true,
},
{
source: "/discord",
destination: "https://discord.gg/fDbezjbJbD",
permanent: true,
},
{
source: "/github",
destination: "https://github.com/unkeyed/unkey",
permanent: true,
},
{
source: "/meet",
destination: "https://cal.com/team/unkey",
permanent: true,
},
];
},
rewrites: () => [
{
source: "/docs",
destination: "https://unkey.mintlify.dev/docs",
},
{
source: "/docs/:match*",
destination: "https://unkey.mintlify.dev/docs/:match*",
},
{
source: "/engineering",
destination: "https://unkey-engineering.mintlify.dev/engineering",
},
{
source: "/engineering/:match*",
destination: "https://unkey-engineering.mintlify.dev/engineering/:match*",
},
{
source: "/discord",
destination: "https://discord.gg/fDbezjbJbD",
},
{
source: "/github",
destination: "https://github.com/unkeyed/unkey",
},
{
source: "/meet",
destination: "https://cal.com/team/unkey",
},
],
};

module.exports = withContentCollections(withBundleAnalyzer(nextConfig));

0 comments on commit b39261c

Please sign in to comment.