-
Notifications
You must be signed in to change notification settings - Fork 385
Redirects: add redirect for weird language issue #4502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@Blargian is attempting to deploy a commit to the ClickHouse Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a Vercel redirect rule to handle malformed documentation URLs that contain two language codes instead of one. This addresses Google Search Console reporting issues with URLs like /docs/zh/jp/...
or /docs/zh/en/...
that should redirect to /docs/zh/...
.
- Added a single redirect rule in
vercel.json
to capture URLs with double language codes and redirect to the correct path using only the first language code
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
"permanent": true | ||
}, | ||
{ | ||
"source": "/docs/:lang1(ru|zh|jp)/:lang2(ru|zh|jp|en)/:path*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The language code 'jp' should be 'ja' for Japanese. The correct ISO 639-1 language code for Japanese is 'ja', not 'jp'.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true, but we're special.
Summary
Google Search Console reports many links which aren't indexed or served on Google such as:
etc
Adds a redirect to the correct path based on the first language code. e.g.
https://clickhouse.com/docs/zh/en/sql-reference/functions/geo/polygons
->- https://clickhouse.com/docs/zh/sql-reference/functions/geo/polygons
Checklist