From c49d0b1e59ef46b3515f0f9c9b041362a040cf66 Mon Sep 17 00:00:00 2001 From: Simon Schweizer Date: Mon, 2 Jun 2025 16:03:00 +0200 Subject: [PATCH 1/2] fix redirect --- docs/src/operations/process-plugin-deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/operations/process-plugin-deployment.md b/docs/src/operations/process-plugin-deployment.md index 0747d59de..f1a64b28a 100644 --- a/docs/src/operations/process-plugin-deployment.md +++ b/docs/src/operations/process-plugin-deployment.md @@ -3,4 +3,4 @@ title: Process Plugin Deployment icon: plugin --- - + From d5102246daa6863a5bf1d71cc1ac9f4600408b7f Mon Sep 17 00:00:00 2001 From: Simon Schweizer Date: Mon, 2 Jun 2025 16:26:54 +0200 Subject: [PATCH 2/2] sidebar version select fixes --- docs/src/.vuepress/layouts/PageLayout.vue | 23 ++++++++++++++++------- docs/src/operations/next | 1 - 2 files changed, 16 insertions(+), 8 deletions(-) delete mode 120000 docs/src/operations/next diff --git a/docs/src/.vuepress/layouts/PageLayout.vue b/docs/src/.vuepress/layouts/PageLayout.vue index ac47d8c33..f4fb8d29c 100644 --- a/docs/src/.vuepress/layouts/PageLayout.vue +++ b/docs/src/.vuepress/layouts/PageLayout.vue @@ -2,7 +2,7 @@ // import ParentLayout from '@vuepress/theme-default/layouts/Layout.vue' import { Layout as ParentLayout, PageContent } from 'vuepress-theme-hope/client' import { useRoute, useRouter } from "vue-router"; -import { ref } from 'vue' +import { ref, onMounted } from 'vue' const version = ref(""); @@ -11,8 +11,10 @@ function setVersionBasedOnCurrentPath() : void { if (route.path.startsWith('/operations/')) { const input = route.path.substring('/operations/'.length); const firstSlash = input.indexOf("/"); - const result = firstSlash !== -1 ? input.slice(0, firstSlash) : input; - + var result = firstSlash !== -1 ? input.slice(0, firstSlash) : input; + if (result === "latest") { + result = document.querySelector("#version-select > option[latest='true']").value; + } version.value = result; @@ -29,13 +31,20 @@ router.afterEach((_to, _from) => { setVersionBasedOnCurrentPath(); }); -setVersionBasedOnCurrentPath(); +onMounted(() => { + setVersionBasedOnCurrentPath(); +}) function navigateToNewVersion() { const input = route.path.substring('/operations/'.length); const firstSlash = input.indexOf("/"); const result = firstSlash !== -1 ? input.slice(firstSlash + 1) : ""; - router.push('/operations/' + version.value + "/" + result); + if (version.value === document.querySelector("#version-select > option[latest='true']").value) { + router.push('/operations/' + "latest" + "/" + result); + } else { + router.push('/operations/' + version.value + "/" + result); + + } } @@ -46,8 +55,7 @@ function navigateToNewVersion() {
diff --git a/docs/src/operations/next b/docs/src/operations/next deleted file mode 120000 index 3ac1df1c8..000000000 --- a/docs/src/operations/next +++ /dev/null @@ -1 +0,0 @@ -v2.0.0-M3 \ No newline at end of file