Skip to content

Allow to hide version warning #3595

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

Merged
merged 16 commits into from
May 24, 2018
9 changes: 9 additions & 0 deletions docs/versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,12 @@ for example ``http://pip.readthedocs.io/``,
they will be redirected to the **Default version**.
This defaults to **latest**,
but could also point to your latest released version.

Version warning
---------------

This is a banner that appears on the top of every page of your docs that aren't stable or latest.
This banner has a text with a link redirecting the users to the latest version of your docs.

This feature is disabled by default on new projects,
you can enable it in the admin section of your docs (Advanced Settings).
2 changes: 1 addition & 1 deletion readthedocs/builds/static/builds/js/detail.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion readthedocs/core/static-src/core/js/doc-embed/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ function init() {
dataType: "jsonp",
data: get_data,
success: function (data) {
versionCompare.init(data.version_compare);
if (data.show_version_warning) {
versionCompare.init(data.version_compare);
}
injectFooter(data);
setupBookmarkCSRFToken();
},
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/core/static/core/js/autocomplete.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions readthedocs/core/static/core/js/readthedocs-doc-embed.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion readthedocs/core/static/core/js/site.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading