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

Link alternate are not unique #106

Open
JPeer264 opened this issue Oct 14, 2020 · 0 comments
Open

Link alternate are not unique #106

JPeer264 opened this issue Oct 14, 2020 · 0 comments

Comments

@JPeer264
Copy link

JPeer264 commented Oct 14, 2020

I am having a canonical and some alternates and different hrefLang. It seems that these stay not unique (repro). There is already a PR in the original react-helmet, but also not yet merged.

Input:

<Helmet>
	<link rel="canonical" href="https://www.xxx.com/subpath/" />
    <link rel="alternate" href="https://www.xxx.com/subpath/" hrefLang="en" />
    <link rel="alternate" href="https://www.xxx.com/subpath/" hrefLang="x-default" />
</Helmet>

<Helmet>
	<link rel="canonical" href="https://www.xxx.com/subpath/anotherpath/" />
    <link rel="alternate" href="https://www.xxx.com/subpath/anotherpath/" hrefLang="en" />
    <link rel="alternate" href="https://www.xxx.com/subpath/anotherpath/" hrefLang="x-default" />
</Helmet>

Output (first two are wrong and should not be here):

- <link rel="alternate" href="https://www.xxx.com/subpath/" hrefLang="en" />
- <link rel="alternate" href="https://www.xxx.com/subpath/" hrefLang="x-default" />
<link rel="canonical" href="https://www.xxx.com/subpath/anotherpath/" />
<link rel="alternate" href="https://www.xxx.com/subpath/anotherpath/" hrefLang="en" />
<link rel="alternate" href="https://www.xxx.com/subpath/anotherpath/" hrefLang="x-default" />
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

1 participant