From ec3bdd243cf9400fdf5e870767799b57f9ac8a3c Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Thu, 13 Aug 2020 10:12:52 +0200 Subject: [PATCH] add link to github --- docs/src/layouts/App/index.vue | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/src/layouts/App/index.vue b/docs/src/layouts/App/index.vue index 9b7609cd..208cbf80 100644 --- a/docs/src/layouts/App/index.vue +++ b/docs/src/layouts/App/index.vue @@ -53,6 +53,13 @@
+

+ + Edit this page on GitHub
+ {{ currentPath }}
+ {{ editLink }} +
+

@@ -86,6 +93,23 @@ export default { menuIsVisible: false, } }, + + computed: { + currentPath () { + return this.$route.matched[0].path + }, + editLink () { + let path = this.currentPath + + if (path === '') { + path = 'docs/src/pages/Index.vue' + } else { + path = `docs/src/docPages${path}.md` + } + + return `https://github.com/ueberdosis/tiptap-next/blob/main/${path}` + }, + } }