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

feat: opt-in alternate link consistency #3320

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

divine
Copy link

@divine divine commented Jan 21, 2025

πŸ”— Linked issue

Fix #3296

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Use canonical queries options for alternate links as well.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

@divine
Copy link
Author

divine commented Jan 21, 2025

We need this fix as soon as possible. It's harming SEO.

You're free to modify the code and push any changes.

Thanks!

@BobbieGoede
Copy link
Collaborator

Will take a look at this soon and will add tests to prevent regressions in the future

@divine
Copy link
Author

divine commented Feb 4, 2025

Will take a look at this soon and will add tests to prevent regressions in the future

It's pretty important for our project. Any update?

Thanks!

@BobbieGoede BobbieGoede force-pushed the alternate-links branch 2 times, most recently from 9e499f1 to e2df557 Compare February 4, 2025 10:50
@BobbieGoede BobbieGoede changed the title fix: use canonicalQueries for alternate links feat: opt-in alternate link consistency Feb 4, 2025
Copy link

pkg-pr-new bot commented Feb 4, 2025

Open in Stackblitz

npm i https://pkg.pr.new/@nuxtjs/i18n@3320

commit: 2346df9

@BobbieGoede
Copy link
Collaborator

I have fixed the implementation and since this would be a breaking change I have made it an opt-in feature with the property experimental.alternateLinkCanonicalQueries.

I have updated your reproduction from #3296 to demonstrate it using the preview release here https://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-kge99mlf?file=nuxt.config.ts, is this what you had in mind?

We may make this default behavior in the next major, but hopefully I can get some more conclusive docs/sources to be sure this is the right approach.

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

Successfully merging this pull request may close these issues.

[SEO] Alternate links shouldn't include GET parameters
2 participants