File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
packages/@vuepress/theme-default/components Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1212 </footer >
1313</template >
1414<script >
15+ import isNil from ' lodash/isNil'
1516import { endingSlashRE , outboundRE } from ' ../util'
1617
1718export default {
@@ -32,18 +33,18 @@ export default {
3233 },
3334
3435 editLink () {
35- if (this .$page .frontmatter .editLink === false ) {
36- return
37- }
36+ const showEditLink = isNil (this .$page .frontmatter .editLink )
37+ ? this .$site .themeConfig .editLinks
38+ : this .$page .frontmatter .editLink
39+
3840 const {
3941 repo ,
40- editLinks ,
4142 docsDir = ' ' ,
4243 docsBranch = ' master' ,
4344 docsRepo = repo
4445 } = this .$site .themeConfig
4546
46- if (docsRepo && editLinks && this .$page .relativePath ) {
47+ if (showEditLink && docsRepo && this .$page .relativePath ) {
4748 return this .createEditLink (
4849 repo,
4950 docsRepo,
You can’t perform that action at this time.
0 commit comments