Closed ktaranov closed 7 years ago
As far as I can tell it will only generate sitemap based on any language setting received by the client through preferred language setting or url based /en /fr /de etc.
I would really like to see the change be made so that the root would be default language with alternate content locations for translated content to form sections like this:
<url>
<loc>https://www.domain.com/what-we-do</loc>
<xhtml:link rel="alternate" hreflang="x-default" href="https://www.domain.com/what-we-do" />
<xhtml:link rel="alternate" hreflang="en" href="https://www.domain.com/en/what-we-do" />
<xhtml:link rel="alternate" hreflang="it" href="https://www.domain.com/it/what-we-do" />
</url>
per https://support.google.com/webmasters/answer/189077?hl=en
It appears that it needs a lot of cross linking, look at this example: https://support.google.com/webmasters/answer/2620865?hl=en
So a correct full sitemap from the previous code example should be:
<url>
<loc>https://www.domain.com/what-we-do</loc>
<xhtml:link rel="alternate" hreflang="x-default" href="https://www.domain.com/what-we-do" />
<xhtml:link rel="alternate" hreflang="en" href="https://www.domain.com/en/what-we-do" />
<xhtml:link rel="alternate" hreflang="it" href="https://www.domain.com/it/what-we-do" />
</url>
<url>
<loc>https://www.domain.com/en/what-we-do</loc>
<xhtml:link rel="alternate" hreflang="x-default" href="https://www.domain.com/what-we-do" />
<xhtml:link rel="alternate" hreflang="en" href="https://www.domain.com/en/what-we-do" />
<xhtml:link rel="alternate" hreflang="it" href="https://www.domain.com/it/what-we-do" />
</url>
<url>
<loc>https://www.domain.com/it/what-we-do</loc>
<xhtml:link rel="alternate" hreflang="x-default" href="https://www.domain.com/what-we-do" />
<xhtml:link rel="alternate" hreflang="en" href="https://www.domain.com/en/what-we-do" />
<xhtml:link rel="alternate" hreflang="it" href="https://www.domain.com/it/what-we-do" />
</url>
In other words, it should output a URL section for each and every path including language versions and cross refer the language version from each section to group them together.
the latest version still have this issue.
PR https://github.com/getgrav/grav-plugin-sitemap/pull/36 introduces support for multilanguage.
Feedback welcome!
I used this module for a client website , sitemap https://www.bsdlab.com/sitemap It works well. This issue should be closed now.
@flaviocopes - we're waiting for this feature. Do you have plans to include it in some future release?
Hy, guys.
Thanks for plugin, Does this plugin works for multi language sites? For example, for my site plugin generate only english pages: http://sqlserver-kit.org/sitemap