sitemap-generator icon indicating copy to clipboard operation
sitemap-generator copied to clipboard

multilingual website xhtml ?

Open elievischel opened this issue 7 years ago • 5 comments

Hi,

would it be possible to add the functionality for multilingual website ? => with http://www.example.com/cool daily <xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/en/cool" /> <xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/de/cool/" />

elievischel avatar Feb 20 '18 19:02 elievischel

Shouldn't be too hard to implement. I will look into it the next days.

lgraubner avatar Feb 20 '18 21:02 lgraubner

@lgraubner thanks it would be really amazing for SEO :)

elievischel avatar Feb 22 '18 09:02 elievischel

I dived into that feature and actually it's not as easy as I expected. The problem is, that the generator has to skip links which are already handled by a link rel="alternate". But unfortunately the generator is not keeping track on which items were already added as it just streams the pieces to a file. Also a lookahead would be required to not add those site before the "main" language site was added with it's links.

lgraubner avatar Feb 24 '18 16:02 lgraubner

@elievischel you can check this one https://github.com/hazemhagrass/sitemap-generator It's a fork from the current implementation and is implemented multi languages crawling

hazemhagrass avatar Apr 16 '18 14:04 hazemhagrass

Thanks, I will have a look.

lgraubner avatar Apr 17 '18 19:04 lgraubner