Skip to content
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

Feature Request: Custom URL and JS to get highest version #29

Open
ntolia opened this issue Jun 6, 2020 · 2 comments · May be fixed by #31
Open

Feature Request: Custom URL and JS to get highest version #29

ntolia opened this issue Jun 6, 2020 · 2 comments · May be fixed by #31

Comments

@ntolia
Copy link

ntolia commented Jun 6, 2020

For docs hosted on sites other that RTD, I would love to be able to point to a custom URL suffix (versionwarning_api_url only provides the base) and have code that extracts the version from that. Happy to provide examples if needed.

@humitos
Copy link
Owner

humitos commented Jun 7, 2020

Hi! Thanks for the suggestion.

If you have an idea already, feel free to open a PR. I would like to keep the default behavior as it is to avoid breaking changes. Just that.

I wouldn't include code to parse a custom response here, but allow the user to pass a custom function's name instead via a config

@ntolia
Copy link
Author

ntolia commented Jun 7, 2020

Thank you. Looking at the code, both the data loading, version detection, and banner injection is wrapped up in checkVersion(). That would likely need to be broken up to allow a custom function to bring in the value for highest_version. Does that sound reasonable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants