Hi!! I've got multiple languages on my site and most of them would have their equivalent URL for the corresponding language. However, in some cases, the URL is only available in one or two languages.
Example:
<url>
<loc>https://mydomain.com/legal/cookies-policy/</loc>
<lastmod>2023-02-27T06:46:41.122Z</lastmod>
<xhtml:link rel="alternate" hreflang="es" href="undefined" />
<xhtml:link rel="alternate" hreflang="pt" href="undefined" />
<xhtml:link rel="alternate" hreflang="fr" href="undefined" />
<xhtml:link rel="alternate" hreflang="de" href="undefined" />
<xhtml:link rel="alternate" hreflang="ru" href="undefined" />
</url>
Is there any way of avoiding that?
Seeing the code, only pushing the tag if href is defined seems like a quick fix. I could submit a PR if needed.
Thanks.
Hi!! I've got multiple languages on my site and most of them would have their equivalent URL for the corresponding language. However, in some cases, the URL is only available in one or two languages.
Example:
Is there any way of avoiding that?
Seeing the code, only pushing the tag if
hrefis defined seems like a quick fix. I could submit a PR if needed.Thanks.