WEB: Fix version switcher
- [ ] closes #xxxx (Replace xxxx with the Github issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.
cc @datapythonista @mroeschke 

The other prs broke the version switcher. It is looking into our html static path, not the website as root path, hence it can not finde the versions.json. We have to give the full link here. Same issue as the logo

I see. It seems like an obvious bug in the switcher code, we're providing the right urls, and for whatever reason it's dropping half of it (feels like it's taking only the last component of the url). For what I see, this doesn't happen in the latest version of the docs, where I think everything works as expected. So, I assume there was a bug that has been fixed.

If your changes here fix the problem, happy to get this merged. I can't really tell why the changes here prevent the bug. Seems like the changes here only affect the current docs, and the old docs (the broken ones) will still look for the `json_url` used in them when they were built.

Not sure if you already tried the changes here, but if you didn't, I think the path to `versions.json` can still be relative, but the `url` values in `versions.json` may not to be absolute to work in older versions of pydata-sphinx-theme. Haven't really got the version switcher to work locally. So if you think this is something else, then we should not merge this.

I read the docs specifically about this and they say that its in the static path 

https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/version-dropdown.html#configure-switcher-json-url

The alternative sounded to me as you would have to provide the complete url, but not sure.
 True, I didn't realize that it's very difficult to test this before merging, as it only affects old docs.

I don't think this will work. Changes to `conf.py` will only affect the last version of the documentation, which is working fine. I think the change needs to be in the `versions.json`, which is what the old versions of the docs fetch, and the only reasonable thing we can change in the old docs. I opened #48600 which I think should fix the problem. Ah got it, thx. This makes sense to me.

closing this one