Skip to content

Commit

Permalink
fix: stay on page after version switch (geneva) (#684)
Browse files Browse the repository at this point in the history
* fix: stay on page after version switch

Signed-off-by: Farshid Tavakolizadeh <farshid.tavakolizadeh@canonical.com>
(cherry picked from commit 6653e8f)

* fix: remove redundant versions, index, cname files (#680)

Signed-off-by: Farshid Tavakolizadeh <farshid.tavakolizadeh@canonical.com>
  • Loading branch information
farshidtz authored Aug 10, 2022
1 parent 3712de4 commit 7583892
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 21 deletions.
1 change: 0 additions & 1 deletion docs/CNAME

This file was deleted.

11 changes: 0 additions & 11 deletions docs/index.html

This file was deleted.

4 changes: 0 additions & 4 deletions docs/versions.json

This file was deleted.

3 changes: 2 additions & 1 deletion docs_src/assets/javascripts/version-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}/`);
}
});

Expand Down
4 changes: 0 additions & 4 deletions versions.json

This file was deleted.

0 comments on commit 7583892

Please sign in to comment.