Skip to content

Non-existent sitemaps are loaded #338

@ojdo

Description

@ojdo

Reproduction steps

Visit any current site using this plugin, e.g. https://ultrabug.github.io/mkdocs-static-i18n/.

Expected behavior

  • Only existing sitemaps are queried, no errors in the browser console.

Observed behavior

  • Browser console reveals that a non-existent https://ultrabug.github.io/mkdocs-static-i18n/fr/sitemap.xml attempted to be loaded (404)

So far, I have traced this back to mkdocs-material's setupAlternate iteration that tries to retrieve one sitemap per rel="alternate" declared link in the header.

<link rel="alternate" href="/mkdocs-static-i18n/" hreflang="en">
<link rel="alternate" href="/mkdocs-static-i18n/fr/" hreflang="fr">

I am reporting this here as I assume that the reconfigure material logic here needs a slight update to prevent this.

I could provide an MR if provided with some guidance whether it makes sense to fix this here, or whether the mkdocs-material theme (which unfortunately has gone into maintenance mode) needs to change its ways.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions