From 81be67d74d5df52e0001fe4541b6c4db77d5231d Mon Sep 17 00:00:00 2001 From: JulioV Date: Mon, 29 Mar 2021 10:46:35 -0400 Subject: [PATCH] Add outdated warning to develop --- docs/javascripts/extra.js | 14 -------------- docs/overrides/main.html | 9 ++++++++- mkdocs.yml | 4 ++-- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/docs/javascripts/extra.js b/docs/javascripts/extra.js index b6d5686d..e69de29b 100644 --- a/docs/javascripts/extra.js +++ b/docs/javascripts/extra.js @@ -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 = "
You are seeing the docs for a previous version of RAPIDS, click here to go to the latest
" - }; - xhr.send(); - }); diff --git a/docs/overrides/main.html b/docs/overrides/main.html index 95538ff4..f7770fba 100644 --- a/docs/overrides/main.html +++ b/docs/overrides/main.html @@ -3,4 +3,11 @@ {% block disqus %} {% include "partials/integrations/utterances.html" %} -{% endblock %} \ No newline at end of file +{% endblock %} + +{% block outdated %} + You're not viewing the latest stable version of RAPIDS. + + Click here to go to latest. + +{% endblock %} diff --git a/mkdocs.yml b/mkdocs.yml index 1316a6ff..8979122b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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'