From f2b1aa851fcb2c4e21b9efd6506e0a5e0b167185 Mon Sep 17 00:00:00 2001
From: Remi  PLANEL <rplanel@pasteur.fr>
Date: Thu, 16 Feb 2023 13:38:43 +0100
Subject: [PATCH] Add editGitlab compo

---
 components/EditGitLab.vue | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 components/EditGitLab.vue

diff --git a/components/EditGitLab.vue b/components/EditGitLab.vue
new file mode 100644
index 00000000..50fda769
--- /dev/null
+++ b/components/EditGitLab.vue
@@ -0,0 +1,22 @@
+<template>
+  <ProseA :to="path" target="blank">
+    <span> Edit this page on GitLab </span>
+  </ProseA>
+</template>
+<script setup lang="ts">
+import { ref } from "vue";
+const { page } = useContent();
+const config = useDocus();
+const props = defineProps<{
+  owner: string;
+  repo: string;
+  branch: string;
+}>();
+const baseUrl = ref(new URL("https://gitlab.pasteur.fr"));
+const path = ref(
+  new URL(
+    `/${props.owner}/${props.repo}/-/edit/${props.branch}/content/${page.value._file}`,
+    baseUrl.value
+  ).href
+);
+</script>
-- 
GitLab