pydata-sphinx-theme icon indicating copy to clipboard operation
pydata-sphinx-theme copied to clipboard

Version switcher not working for old docs

Open datapythonista opened this issue 1 year ago • 6 comments

In your own website, if you're in an old version of the docs, the links in the version switcher are incorrect. Change version from example from here: https://pydata-sphinx-theme.readthedocs.io/en/v0.8.0/index.html

We had a similar problem with pandas, for context see this comment: https://github.com/pandas-dev/pandas/pull/48600#issuecomment-1252065060

datapythonista avatar Sep 20 '22 09:09 datapythonista

It looks like in our documentation this problem begins with 0.8 and is fine >= 0.8.1:

  • https://pydata-sphinx-theme.readthedocs.io/en/v0.8.1/
  • https://pydata-sphinx-theme.readthedocs.io/en/v0.8.0/

It seems like on 0.8.0 it's adding an extra v to the URL (so the URL incorrectly renders as https://pydata-sphinx-theme.readthedocs.io/en/vv0.8.1/

For your theme, could you backport an update to your documentation so that the pydata theme is updated and thus the switcher configuration behaves properly?

I don't think there is anything that we can do about this for the pydata theme, because we can't backport a higher version of our own theme to the documentation of the same theme. IMO our solution should be to remove documentation for versions older than ~0.8.1

@drammock could you provide a rationale for why you think this issue should block any future releases?

choldgraf avatar Sep 25 '22 16:09 choldgraf

For us it broke in the release we started using url instead of version, so we kept the versions broken in the json, and the links are working well now. I think version is also used to compare the current version, and that may be broken, but not quite sure if there is anything not fully working.

datapythonista avatar Sep 25 '22 17:09 datapythonista

My feeling is that we don't want to block all future releases on this issue, and we should remove the block-release label from this issue. I am not sure what exactly the problem is here, or what the fix should be, but it doesn't seem like it is a bug that has been introduced since the last release, and so I'm not sure what benefit we get from blocking a new release.

choldgraf avatar Sep 28 '22 13:09 choldgraf

My feeling is that we don't want to block all future releases on this issue

agreed. I've removed the tag. I initially added it somewhat hastily without looking closely enough at what the problem was. I'd like to leave this open though as a reminder to consider backporting a fix... IMO there is a valid use case for switching back and forth between current and older doc versions (namely, figuring out when a change was introduced if it's not in the changelog), which requires that the switcher work correctly on the older sites.

drammock avatar Sep 28 '22 14:09 drammock

Definitely agree we should track this one - though I'm still not sure yet what the underlying fix needs to be.

choldgraf avatar Sep 28 '22 15:09 choldgraf