add link to github
This commit is contained in:
@@ -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>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user