From d64dd07f98842cbcad56cedf5f05da8dcd990546 Mon Sep 17 00:00:00 2001 From: Farshid Tavakolizadeh Date: Fri, 28 Jan 2022 17:15:28 +0100 Subject: [PATCH 1/2] fix: stay on page after version switch Signed-off-by: Farshid Tavakolizadeh (cherry picked from commit 6653e8fc2c55280fad603f60393e49d9ef8e3a7a) --- docs_src/assets/javascripts/version-select.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs_src/assets/javascripts/version-select.js b/docs_src/assets/javascripts/version-select.js index 0fdd90ec72..3dc99017db 100644 --- a/docs_src/assets/javascripts/version-select.js +++ b/docs_src/assets/javascripts/version-select.js @@ -57,7 +57,8 @@ window.addEventListener("DOMContentLoaded", function () { if (this.value === '1.1') { window.location.href = "https://fuji-docs.edgexfoundry.org" } else { - window.location.href = "/" + this.value; + // replace version in the beginning of path with selected version + window.location.pathname = window.location.pathname.replace(/^\/(\d.\d)\//, `/${this.value}/`); } }); From cab77a05fe78be42ba3be4ec0a208fb4dcde5f67 Mon Sep 17 00:00:00 2001 From: Farshid Tavakolizadeh Date: Fri, 28 Jan 2022 17:55:02 +0100 Subject: [PATCH 2/2] fix: remove redundant versions, index, cname files (#680) Signed-off-by: Farshid Tavakolizadeh --- docs/CNAME | 1 - docs/index.html | 11 ----------- docs/versions.json | 5 ----- versions.json | 5 ----- 4 files changed, 22 deletions(-) delete mode 100644 docs/CNAME delete mode 100644 docs/index.html delete mode 100644 docs/versions.json delete mode 100644 versions.json diff --git a/docs/CNAME b/docs/CNAME deleted file mode 100644 index 1cddf7cd7b..0000000000 --- a/docs/CNAME +++ /dev/null @@ -1 +0,0 @@ -docs.edgexfoundry.org \ No newline at end of file diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index bc184c8c36..0000000000 --- a/docs/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - Redirecting - - - - - \ No newline at end of file diff --git a/docs/versions.json b/docs/versions.json deleted file mode 100644 index 365bc5eb71..0000000000 --- a/docs/versions.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - {"version": "1.1", "title": "1.1-Fuji", "aliases": []}, - {"version": "1.2", "title": "1.2-Geneva", "aliases": []}, - {"version": "1.3", "title": "1.3-Hanoi", "aliases": []} -] \ No newline at end of file diff --git a/versions.json b/versions.json deleted file mode 100644 index 365bc5eb71..0000000000 --- a/versions.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - {"version": "1.1", "title": "1.1-Fuji", "aliases": []}, - {"version": "1.2", "title": "1.2-Geneva", "aliases": []}, - {"version": "1.3", "title": "1.3-Hanoi", "aliases": []} -] \ No newline at end of file