Add outdated warning to develop
parent
61d0300adc
commit
81be67d74d
|
@ -1,14 +0,0 @@
|
|||
window.addEventListener("DOMContentLoaded", function() {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", window.location.origin + "/versions.json");
|
||||
xhr.onload = function() {
|
||||
var versions = JSON.parse(this.responseText);
|
||||
latest_version = ""
|
||||
for(id in versions)
|
||||
if(versions[id]["aliases"].length > 0 && versions[id]["aliases"].includes("latest"))
|
||||
latest_version = "/" + versions[id].version + "/"
|
||||
if(!window.location.pathname.includes("/latest/") && (latest_version.length > 0 && !window.location.pathname.includes(latest_version)))
|
||||
document.querySelector("div[data-md-component=announce]").innerHTML = "<div id='announce-msg'>You are seeing the docs for a previous version of RAPIDS, <a href='http://www.rapids.science/'>click here to go to the latest</a></div>"
|
||||
};
|
||||
xhr.send();
|
||||
});
|
|
@ -3,4 +3,11 @@
|
|||
{% block disqus %}
|
||||
<!-- Add custom comment system integration here -->
|
||||
{% include "partials/integrations/utterances.html" %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
{% block outdated %}
|
||||
You're not viewing the latest stable version of RAPIDS.
|
||||
<a href="{{ config.site_url | url }}">
|
||||
<strong> Click here to go to latest. </strong>
|
||||
</a>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
site_name: RAPIDS
|
||||
site_url: https://www.rapids.science/
|
||||
markdown_extensions:
|
||||
- toc:
|
||||
permalink: True
|
||||
|
@ -35,14 +36,13 @@ markdown_extensions:
|
|||
- def_list
|
||||
extra:
|
||||
version:
|
||||
method: mike
|
||||
provider: mike
|
||||
social:
|
||||
- icon: fontawesome/brands/twitter
|
||||
link: 'https://twitter.com/julio_ui'
|
||||
extra_javascript:
|
||||
- https://polyfill.io/v3/polyfill.min.js?features=es6
|
||||
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
|
||||
- javascripts/extra.js
|
||||
|
||||
repo_name: 'carissalow/rapids'
|
||||
repo_url: 'https://github.com/carissalow/rapids'
|
||||
|
|
Loading…
Reference in New Issue