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

Can only include one HrefLang tag (cannot implement recommended pattern) #24

Closed
EricBos opened this issue Nov 21, 2021 · 5 comments
Closed

Comments

@EricBos
Copy link

EricBos commented Nov 21, 2021

It is recommended to include the current language of a page in the hreflang as well as a link for each and every other language version of a page.

With the current implementation the Hreflang Link elements are overwriting itself.

I think it's because of the code below:

const linkComparer = {
           canonical: () => true,
           prev: () => true,
           next: () => true,
           icon: (m, a) => ('' + m.sizes) === a.s,
           alternate: (m, a) => m.type === a.p && m.media === a.m,
           preload: (m, a) => getAttr(m, href) === a.h && m.media === a.m,
       };

Shouldn't the HrefLang also be part of the link comparison?

@jsakamoto
Copy link
Owner

@EricBos
Thank you for letting me know! 👍
Yes, you are right, I could not realize it until I received your issue post, but HrefLang had to be a part of the link comparison.

I'll fix the "Blazor Head Element Helper" libraries about this point in the near future.

@EricBos
Copy link
Author

EricBos commented Nov 24, 2021

Awesome! I'll wait for the release then

@jsakamoto
Copy link
Owner

@EricBos
Copy link
Author

EricBos commented Nov 30, 2021 via email

@EricBos EricBos closed this as completed Nov 30, 2021
@EricBos
Copy link
Author

EricBos commented Nov 30, 2021

Confirmed!

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

No branches or pull requests

2 participants