i18n + Sitemaps (Testing Needed)

52 views
Skip to first unread message

Carlton Gibson

unread,
Apr 2, 2020, 6:34:57 AM4/2/20
to Django developers (Contributions to Django itself)
Hiya,

Are you using i18n + contrib.sitemaps?

There's a PR here to add alternate hreflang links to sitemaps:



The idea is that if Sitemap.i18n is True, each URL will have pointers to the equivalent versions in other languages:

This kind of thing:

 <url>
    <loc>http://www.example.com/english/page.html</loc>
    <xhtml:link
               rel="alternate"
               hreflang="de"
               href="http://www.example.com/deutsch/page.html"/>
    <xhtml:link
               rel="alternate"
               hreflang="de-ch"
               href="http://www.example.com/schweiz-deutsch/page.html"/>
    <xhtml:link
               rel="alternate"
               hreflang="en"
               href="http://www.example.com/english/page.html"/>
</url>

The PR looks OK, but I'm wondering if a few people could throw it through it's paces to see what edge cases come up?

If you can:

    pip install -e git+https://github.com/django/django@refs/pull/11937/head#egg=Django

* Does your `Sitemap.i18n = True` still render correctly?
* Are there any issue if you set (the new) `Sitemap.x_default = True`

Docs changes:
https://github.com/django/django/pull/11937/files#diff-083e9ed1a53be195444ef4656ddc6d3fR251-R283

Thanks for looking if you can and are using this.

Kind Regards,

Carlton


Reply all
Reply to author
Forward
0 new messages