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

"default" config broken in sphinx 5

Open ailin-nemui opened this issue 2 years ago • 4 comments

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 avatar Jun 11 '22 22:06 ailin-nemui

@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}"

kai687 avatar Jul 21 '22 14:07 kai687

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.

jdillard avatar Jul 22 '22 02:07 jdillard

ok thanks, but it was a surprising breakage

ailin-nemui avatar Jul 22 '22 07:07 ailin-nemui

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.

jdillard avatar Dec 18 '22 06:12 jdillard