prestaconcept / PrestaSitemapBundle

A symfony bundle that provides tools to build a rich application sitemap. The main goals are : simple, no databases, various namespace (eg. google image), respect constraints etc.
MIT License
355 stars 102 forks source link

Add default locale as hreflang when using alternate option #270

Closed taylankasap closed 3 years ago

taylankasap commented 3 years ago

This code should be removed:

https://github.com/prestaconcept/PrestaSitemapBundle/blob/63f54b809cc2f3cb82bf16cc866b9ea24421700b/EventListener/StaticRoutesAlternateEventListener.php#L69-L71

Reason

Both from Google docs:

Each element must have a child element that lists every alternate version of the page, including itself.

Each language version must list itself as well as all other language versions.

I can open PR if that's okay.

yann-eugone commented 3 years ago

Hu @taylankasap :)

Thank you for reporting this enhancement. Looks like you are right, regarding the doc you provided.

A PR would be nice. Will you be OK to add some tests too ?

yann-eugone commented 3 years ago

Released as of v2.5.0