You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
mosc9575
changed the title
Enable user to "Choose version" as a default in the switcher field
Enable user to overwrite "Choose version" as a default in the switcher field
Jun 16, 2024
If the switcher says "choose version" it indicates that something went wrong in determining what version of the docs are currently being viewed (and matching that up with a corresponding entry in the switcher JSON array). In other words, it's a "graceful failure mode" so that the intent of the dropdown is still clear. I'd rather not make it possible to have the switcher appear as if it detected the version but have it actually display something (possibly) inaccurate.
Can you check the Javascript console of your browser when your site is loaded, to see if:
some other JS error is preventing the version detection from running, or
there's an error in the version detection itself, or
check your JSON to make sure the entries there are correct?
I know, that "Choose version" shows up, if no version match can be found in the switcher.json . The original post comes from bokeh #13477. In an earlier version, the default wasn't "Choose version" but the "dev"-version.
At the moment we have to update the switcher.json for each development version, if we want the old behavior. This is somehow annoying. And after an release the latest dev versions can still be found on the web because they arn't removed, but the switcher.json will not have an entry for each older dev version. This means, it will display "Choose version" again.
In this issue I want to set the default by hand, if this is possible.
This is a feature request, to enable the user to overwrite
"Choose version"
with a string the user preferes.In my case I want to show the build version of the docs if no version in the
switcher.json
matches.This was the case before 5db8dff was commited.
At the moment the relevant code line is this
pydata-sphinx-theme/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/version-switcher.html
Line 16 in 09849cc
and I suggest to change this line to
so the user can define his personal default value in the
conf.py
by addingversion_match_default
to the switcher settings.For example this should be possible.
The text was updated successfully, but these errors were encountered: