add link to github

This commit is contained in:
Hans Pagel
2020-08-13 10:12:52 +02:00
parent dd94d98a9b
commit ec3bdd243c

View File

@@ -53,6 +53,13 @@
</div> </div>
<main class="app__main"> <main class="app__main">
<slot/> <slot/>
<p>
<a :href="editLink" target="_blank">
<span>Edit this page on GitHub</span><br />
{{ currentPath }}<br />
{{ editLink }}
</a>
</p>
<page-navigation /> <page-navigation />
</main> </main>
</div> </div>
@@ -86,6 +93,23 @@ export default {
menuIsVisible: false, 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}`
},
}
} }
</script> </script>