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

Incorrect link[rel="alternate"] href for upcoming events and previous events pages #90

Open
FaberVitale opened this issue Oct 18, 2024 · 1 comment
Labels
bug Something isn't working seo

Comments

@FaberVitale
Copy link
Collaborator

Describe the bug

Repro steps

  1. Visit one of these pages:
  1. Open the console and paste:
console.log(document.querySelector('link[rel="alternate"]').href)
  1. navigate the link you see in console

Expected

The page should be the equivalent in the other language it => en and viceversa

Current

The link is incorrect and points to a 404.

example

https://romajs.org/it/upcoming-events/

System Info

not relevant

Severity

major

@FaberVitale FaberVitale added bug Something isn't working seo labels Oct 18, 2024
@FaberVitale
Copy link
Collaborator Author

FaberVitale commented Oct 19, 2024

It seems that the whole link rel="alternate" automatic generation is a bit naive (my bad 😅) and should be refactored entirely.

See generateLinkRelAlternateProps:

export function generateLinkRelAlternateProps(url: URL): RelAlternateProps[] {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working seo
Projects
None yet
Development

No branches or pull requests

1 participant