From 2bc1c8d8648c84d61b87816bbd0b83cd27fc6e86 Mon Sep 17 00:00:00 2001 From: Remi PLANEL <rplanel@pasteur.fr> Date: Fri, 29 Sep 2023 10:27:38 +0200 Subject: [PATCH] Make path reactive : Closes #131 --- components/EditGitlab.vue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/components/EditGitlab.vue b/components/EditGitlab.vue index 632e0952..ed11924b 100644 --- a/components/EditGitlab.vue +++ b/components/EditGitlab.vue @@ -11,15 +11,12 @@ const { page } = useContent(); const owner = ref("mdm-lab"); const repo = ref("wiki"); const branch = ref("main"); - - const baseUrl = ref(new URL("https://gitlab.pasteur.fr")); -// https://github.com/rplanel/defense-finder-wiki-test/edit/dev/content/1.introduction/0.index.md -const path = ref( - new URL( +const path = computed(() => { + return new URL( `/${owner.value}/${repo.value}/-/edit/${branch.value}/content/${page.value._file}`, baseUrl.value ).href -); +}) </script> -- GitLab