docs: invalid Edit this page link on main branch

This commit is contained in:
Benjamin Canac
2023-09-21 12:53:42 +02:00
parent 86dc49ecc9
commit b3a52482f2

View File

@@ -75,7 +75,7 @@ const headline = computed(() => findPageHeadline(page.value))
const links = computed(() => [{
icon: 'i-heroicons-pencil-square',
label: 'Edit this page',
to: `https://github.com/nuxt/ui/edit/dev/docs/content/${page?.value?._file.split('/').slice(1).join('/')}`,
to: `https://github.com/nuxt/ui/edit/dev/docs/content/${branch.value?.name === 'dev' ? page?.value?._file.split('/').slice(1).join('/') : page?.value?._file}`,
target: '_blank'
}, {
icon: 'i-heroicons-star',