Skip to content
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

general: fix lang links for bots #848

Merged
merged 13 commits into from
Dec 19, 2024
Prev Previous commit
Next Next commit
first remove query, then lang
  • Loading branch information
zbycz committed Dec 19, 2024
commit ff511fc005c391bc3727f2452756d1633157e8f7
4 changes: 2 additions & 2 deletions src/helpers/LangLinks.tsx
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@ export const getUrlForLangLinks = (ctx: DocumentContext) => {
console.log('ctx.asPath', ctx.asPath);

const fixedPath = ctx.asPath
.replace(/^\/[a-z]{2}(\/|$)/, '$1')
.replace(/\?nxtPall=.*$/, '');
.replace(/\?nxtPall=.*$/, '')
.replace(/^\/[a-z]{2}(\/|$)/, '$1');
console.log('fixedPath2', fixedPath);
if (fixedPath === '/') {
return '';
Loading