Skip to content

Commit

Permalink
fix(edit-link): let frontmatter overwrite global editLink (#340)
Browse files Browse the repository at this point in the history
Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com>
  • Loading branch information
dirkdev98 and posva committed Jul 22, 2021
1 parent aa9f909 commit cfbba80
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/client/theme-default/composables/editLink.ts
Expand Up @@ -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) {
Expand Down

0 comments on commit cfbba80

Please sign in to comment.