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
In our version switching implementation, we currently ask people to provide a JSON file that is a list of entries, each of which corresponds to a version. Something like:
However, there may be cases where we want to configure behavior changes for the switcher across all versions of documentation without requiring them to edit conf.py in each version. In that case, we need a single place to define the new configuration.
I propose that we allow the switcher.json structure to also be a dictionary instead of just a list of entries.
If switcher.json is a dictionary, then it must have a key versions: <list-of-entries>, where <list-of-entries> is the structure we currently support. It may also have other keys that configure it in different ways (e.g. preferred: "some-version")
If switcher.json is a list, then assume it is just <list-of-entries> with no extra configuration (AKA, the current behavior).
I think this would let us extend the functionality of the version switcher, without breaking current implementations, and without being too brittle since the check of "is it a dict or a list" is pretty straightforward.
Any objections / suggestions otherwise?
The text was updated successfully, but these errors were encountered:
Context
In our version switching implementation, we currently ask people to provide a JSON file that is a list of entries, each of which corresponds to a version. Something like:
However, there may be cases where we want to configure behavior changes for the switcher across all versions of documentation without requiring them to edit
conf.py
in each version. In that case, we need a single place to define the new configuration.One example of this is discussed in:
Proposal
I propose that we allow the
switcher.json
structure to also be a dictionary instead of just a list of entries.If
switcher.json
is a dictionary, then it must have a keyversions: <list-of-entries>
, where<list-of-entries>
is the structure we currently support. It may also have other keys that configure it in different ways (e.g.preferred: "some-version"
)If
switcher.json
is a list, then assume it is just<list-of-entries>
with no extra configuration (AKA, the current behavior).I think this would let us extend the functionality of the version switcher, without breaking current implementations, and without being too brittle since the check of "is it a dict or a list" is pretty straightforward.
Any objections / suggestions otherwise?
The text was updated successfully, but these errors were encountered: