pydata-sphinx-theme
pydata-sphinx-theme copied to clipboard
RFC: better JSON structure for version switcher
> Another possibility is to keep it as a list-of-dicts, and have users optionally add a preferred=True item to one entry, and similarly an optional latest=True to one entry.
I'm not a huge fan on this as it easily leaves open the possibility of erroneously adding preferred
and latest
to more than one dict, and now you need some validation step if you want to make sure you haven't screwed up your JSON file. I'd rather just have one top -level value to update, which does not leave open that possibility, and is also simpler to automate. I'm not sure which is easier to implement but I have strong opinions about which one is more user-friendly.
Originally posted by @bryevdv in https://github.com/pydata/pydata-sphinx-theme/issues/945#issuecomment-1258766748