-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: add optional per version url in version-switcher #575
Conversation
a58caff
to
cdb4295
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't test (no computer access, only phone) but the code changes look correct to me
|
||
- ``version``: a version string. This will be inserted into | ||
``switcher['url_template']`` to create the links to other docs versions, and | ||
also checked against ``switcher['version_match']`` to provide styling to the | ||
switcher. | ||
- ``name``: an optional name to display in the switcher dropdown instead of the | ||
version string (e.g., "latest", "stable", "dev", etc). | ||
- ``url``: an optional URL. If provided, it links the version to ``url`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add an example of this usage in one of the entries in the example below, with a comment like "Note that because url
is specified for entry XXX, this URL will be used instead of the automatically-generated one."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added it in an example. But since it's a JSON file I cannot really add a comment no??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (modulo @choldgraf is OK with the added example on his comment).
@choldgraf can you please take another look? 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a quick comment about wording but this looks good to me as well!
Co-authored-by: Chris Holdgraf <[email protected]>
Thanks! 🎉 |
Closes #573
Allow to specify
url
inswitcher.json
. It would directly link a given version to the specified url and not useurl_template
.