react-helmet-async
react-helmet-async copied to clipboard
Link alternate are not unique
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" />