Skip to content

Commit 37b7d31

Browse files
Handling redirects part 1
1 parent 6c4e08d commit 37b7d31

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

docs-v2/next-sitemap.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ module.exports = {
1010
"/hidden/*",
1111
"/deprecated/*",
1212
],
13+
transform: async (config, path) => {
14+
// Add any custom transformations for URL paths here if needed in the future
15+
return {
16+
loc: path,
17+
changefreq: config.changefreq,
18+
priority: config.priority,
19+
lastmod: config.autoLastmod
20+
? new Date().toISOString()
21+
: undefined,
22+
alternateRefs: config.alternateRefs ?? [],
23+
};
24+
},
1325
robotsTxtOptions: {
1426
policies: [
1527
{

docs-v2/next.config.mjs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,46 @@ export default withNextra({
461461
destination: "/integrations/oauth-clients/",
462462
permanent: true,
463463
},
464+
{
465+
source: "/integrations/:path*/",
466+
destination: "/apps/:path*/",
467+
permanent: true,
468+
},
469+
{
470+
source: "/workflows/contributing/components/:path*/",
471+
destination: "/components/contributing/:path*/",
472+
permanent: true,
473+
},
474+
{
475+
source: "/workflows/contributing/components/",
476+
destination: "/components/contributing/",
477+
permanent: true,
478+
},
479+
{
480+
source: "/workflows/contributing/",
481+
destination: "/components/contributing/",
482+
permanent: true,
483+
},
484+
{
485+
source: "/workflows/projects/:path*/",
486+
destination: "/projects/:path*/",
487+
permanent: true,
488+
},
489+
{
490+
source: "/workflows/projects/",
491+
destination: "/projects/",
492+
permanent: true,
493+
},
494+
{
495+
source: "/workflows/workspaces/:path*/",
496+
destination: "/workspaces/:path*/",
497+
permanent: true,
498+
},
499+
{
500+
source: "/workflows/workspaces/",
501+
destination: "/workspaces/",
502+
permanent: true,
503+
},
464504
];
465505
},
466506
async rewrites() {

0 commit comments

Comments
 (0)