Skip to content

Conversation

@tupui
Copy link
Contributor

@tupui tupui commented Jan 20, 2022

Closes #573

Allow to specify url in switcher.json. It would directly link a given version to the specified url and not use url_template.

@tupui tupui force-pushed the version_switcher_url branch from a58caff to cdb4295 Compare January 20, 2022 11:54
Copy link
Member

@drammock drammock left a 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

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``
Copy link
Collaborator

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."

Copy link
Contributor Author

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??

@tupui tupui requested a review from choldgraf January 26, 2022 23:06
Copy link
Collaborator

@damianavila damianavila left a 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).

@tupui
Copy link
Contributor Author

tupui commented Feb 7, 2022

@choldgraf can you please take another look? 😃

Copy link
Collaborator

@choldgraf choldgraf left a 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!

@choldgraf choldgraf merged commit 052a7fa into pydata:master Feb 8, 2022
@tupui tupui deleted the version_switcher_url branch February 8, 2022 21:15
@tupui
Copy link
Contributor Author

tupui commented Feb 8, 2022

Thanks! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow multiple url_template in version switcher

4 participants