-
-
Couldn't load subscription status.
- Fork 6.4k
fix: fixed localized links and next links redirection #5474
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
fix: fixed localized links and next links redirection #5474
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Requesting fast-tracking @nodejs/build @nodejs/website |
|
Looks like Prettier is complaining https://github.com/nodejs/nodejs.org/actions/runs/5466287396/jobs/9950981528?pr=5474#step:7:20 |
|
This PR is a result of some of the studies done over This Slack thread that is part of the long-term investigation regarding the website stability on the DigitalOcean infrastructure, which is occasionally causing flakiness on our infrastructure. As explained previously (including on the March 17th incident post-mortem), CloudFlare does not cache 404 requests, and some requests originated by Next.js itself (Next.js pre-fetching URLs) were causing high-load on our DigitalOcean infrastructure. This PR removes the unnecessary pre-fetching from external links not hosted by this repository/the Next.js framework we use here, effectively reducing the amount of 404s. This might alleviate some of the pain on the DO's servers. Remember that regardless of the current "incident", external links should not be pre-fetched by Next.js. |
Description
This PR is a "hot-fix" PR that does the following changes:
LocalizedLinkcomponent by conditionally either renderingnext/linkora hrefLocalizedLinkby adopting memoizationThere are minor unrelated changes (such as removing an
eslintrule that is unnecessary) andnpm run formatreformatted an SCSS file.