From: Kefu Chai Date: Tue, 1 Dec 2020 07:16:15 +0000 (+0800) Subject: doc: check "release" context variable for #dev-warning X-Git-Tag: v16.1.0~427^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7a62303b57150814ff465eb611b69b3b2e9f03f1;p=ceph.git doc: check "release" context variable for #dev-warning if $release is "dev", then the release being built is not a stable version. drop ceph.js, as the web page is generated at build time. since the last user of "releases.json" is gone, now we can drop the hooks preparing "releases.json" in conf.py as well. Signed-off-by: Kefu Chai --- diff --git a/doc/_static/js/ceph.js b/doc/_static/js/ceph.js deleted file mode 100644 index 1d22a8b9e9ea..000000000000 --- a/doc/_static/js/ceph.js +++ /dev/null @@ -1,23 +0,0 @@ -$(function() { - var releases_url = DOCUMENTATION_OPTIONS.URL_ROOT + '_static/releases.json'; - - function get_branch() { - var pathname = window.location.pathname; - var res = pathname.match(/en\/([a-z]+)\/?/i) - if (res) { - return res[1] - } - return null; - } - - $.getJSON(releases_url, function(data) { - var branch = get_branch(); - if (branch === "master") { - $("#dev-warning").show(); - } else if (data && data.releases && branch in data.releases) { - return; - } else { - $("#dev-warning").show(); - } - }); -}); diff --git a/doc/_templates/page.html b/doc/_templates/page.html index a4d4236a3c27..3923975d78f0 100644 --- a/doc/_templates/page.html +++ b/doc/_templates/page.html @@ -1,10 +1,12 @@ {% extends "!page.html" %} {% block body %} -