sphinx-sitemap
sphinx-sitemap copied to clipboard
"default" config broken in sphinx 5
With no language configured, a mono-lingual site sitemap suddenly gains /en/ in the sitemap after updating to sphinx 5, breaking all paths
@ailin-nemui not sure if that helps you, but I found this workaround for my single language, single version site. I added this to the conf.py
file:
sitemap_url_scheme = "{link}"
I think @kai687 answer is the preferred solution. The default isn't meant to work in all cases here, it is meant as a recommended starting point as everyone has a different preference on URL structure. Since it doesn't seem possible to have a language of "none" on Sphinx 5, it doesn't seem there is a reliable way to test for it.
ok thanks, but it was a surprising breakage
I added sitemap_validator_urls
and sitemap_validator_required
config values, with instructions on how to use them in a PR: https://github.com/jdillard/sphinx-sitemap/pull/37
It won't help anyone in this situation that doesn't add the new configuration options, and it possibly can't help people that do multi-lingual builds, but it's about as much as I think I can do given the limited view the extension has inside more complex build pipelines.