Skip to content

Commit fbc8aa9

Browse files
authored
Merge pull request #3595 from stsewd/allow-hide-version-warning
Allow to hide version warning
2 parents 480c367 + ad4e80e commit fbc8aa9

File tree

15 files changed

+155
-9
lines changed

15 files changed

+155
-9
lines changed

docs/versions.rst

+9
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,12 @@ for example ``http://pip.readthedocs.io/``,
5555
they will be redirected to the **Default version**.
5656
This defaults to **latest**,
5757
but could also point to your latest released version.
58+
59+
Version warning
60+
---------------
61+
62+
This is a banner that appears on the top of every page of your docs that aren't stable or latest.
63+
This banner has a text with a link redirecting the users to the latest version of your docs.
64+
65+
This feature is disabled by default on new projects,
66+
you can enable it in the admin section of your docs (Advanced Settings).

readthedocs/builds/static/builds/js/detail.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

readthedocs/core/static-src/core/js/doc-embed/footer.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ function init() {
7171
dataType: "jsonp",
7272
data: get_data,
7373
success: function (data) {
74-
versionCompare.init(data.version_compare);
74+
if (data.show_version_warning) {
75+
versionCompare.init(data.version_compare);
76+
}
7577
injectFooter(data);
7678
setupBookmarkCSRFToken();
7779
},

readthedocs/core/static/core/js/autocomplete.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

readthedocs/core/static/core/js/readthedocs-doc-embed.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

readthedocs/core/static/core/js/site.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)