fix(edit-link): let frontmatter overwrite global editLink (#340)

Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com>
pull/341/head
Dirk de Visser 3 years ago committed by GitHub
parent aa9f9094b5
commit cfbba80a0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,7 +16,10 @@ export function useEditLink() {
editLinks
} = theme.value
const showEditLink = frontmatter.value.editLink || editLinks
const showEditLink =
frontmatter.value.editLink != null
? frontmatter.value.editLink
: editLinks
const { relativePath } = page.value
if (!showEditLink || !relativePath || !repo) {

Loading…
Cancel
Save