Skip to content

Conversation

@nearestnabors
Copy link
Contributor

@nearestnabors nearestnabors commented Jan 6, 2026

Summary

  • Added /en/ locale prefix to all redirect sources and destinations
  • Removed duplicate redirects and trailing slash redirects that Nextra handles automatically
  • Ensures URLs like /en/home/build-tools/create-a-mcp-server redirect properly to /en/guides/create-tools/tool-basics/build-mcp-server

Changes Made

  • 71 total redirects with proper /en/ prefix
  • No duplicate sources - each source path appears only once
  • No circular redirects - verified no redirect loops
  • No self-referential redirects - all destinations are different from sources
  • Clean syntax - proper TypeScript structure and formatting

Testing

  • Analyzed all redirects for duplicates and circular references
  • Verified proper /en/ locale prefix on all sources and destinations
  • Removed unnecessary trailing slash redirects that Nextra handles automatically

Impact

This fixes 404 issues for internationalized URLs that weren't properly redirecting due to missing locale prefixes.

🤖 Generated with Claude Code


Note

Updates site routing to the new information architecture and localized URLs.

  • Adds comprehensive /:locale/* redirects in next.config.ts (home → guides/resources, MCP servers → resources/integrations, reference/path fixes, and framework alias paths)
  • Maps legacy toolkit links in toolkits.tsx (/en/mcp-servers/{category}/{tool}) to /en/resources/integrations/{category}/{tool}/reference
  • Enhances findToolkitFromPath in toolkit-utils.ts to resolve toolkits from both /resources/integrations/{category}/{tool} and /.../reference
  • Updates remark-glossary to skip glossary auto-linking on /resources/integrations/* pages

Written by Cursor Bugbot for commit 6f5140e. This will update automatically on new commits. Configure here.

nearestnabors and others added 5 commits January 5, 2026 21:03
- Added /en/ locale prefix to all redirect sources and destinations
- Removed duplicate redirects and trailing slash redirects
- Ensures URLs like /en/home/build-tools/create-a-mcp-server redirect properly
- Total of 59 clean redirects with proper /en/ prefix

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Jan 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
docs Ready Ready Preview, Comment Jan 6, 2026 2:48am

@nearestnabors nearestnabors enabled auto-merge (squash) January 6, 2026 01:01
@evantahler
Copy link
Contributor

Passing my review to @sdserranog - I thought the /lang prefixes should be handled already

@evantahler evantahler requested review from sdserranog and removed request for evantahler January 6, 2026 01:28
@sdserranog
Copy link
Contributor

Yeah, the prefix should be added automatically. I think there's no need to add it; I'm curious why we're doing it. Regarding the functions we added to fix the links for integration, we should remove those. I updated the design system links, and we just need to upgrade the design system version to get the correct link.

@nearestnabors
Copy link
Contributor Author

So I thought the same. But apparently for 301 redirects, they need the whole path. That was why the redirect from the dashboard wasn't working. I think. I'm happy if you want to take this on and test the redirects, @sdserranog. I'm out of steam.

@sdserranog
Copy link
Contributor

@nearestnabors I can take this one if it's okay for me to do it first thing tomorrow. I need to step up for today.

@sdserranog sdserranog requested a review from evantahler January 6, 2026 02:36
@nearestnabors nearestnabors merged commit 3b560f2 into main Jan 6, 2026
6 checks passed
@sdserranog sdserranog deleted the fix-redirect-prefixes branch January 6, 2026 02:49

// Return original link if it doesn't match the pattern
return oldLink;
}
Copy link

Choose a reason for hiding this comment

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

mapToNewIA regex requires /en/ prefix that may be absent

The mapToNewIA function's regex pattern ^\/en\/mcp-servers\/... requires the input link to start with /en/mcp-servers/. Based on the PR discussion, the design system likely provides relativeDocsLink values without the /en/ locale prefix since "the prefix should be added automatically." If the design system returns paths like /mcp-servers/productivity/gmail, the regex won't match and the original (potentially broken) link will be returned unchanged. The pattern may need to handle links both with and without the locale prefix.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants