File tree 2 files changed +15
-9
lines changed
2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ node_modules
4
4
.temp
5
5
vuepress
6
6
TODOs.md
7
+ * .sw *
Original file line number Diff line number Diff line change 1
1
<template >
2
- <nav class =" nav-links" v-if =" userLinks.length || githubLink " >
2
+ <nav class =" nav-links" v-if =" userLinks.length || repoLink " >
3
3
<!-- user links -->
4
4
<div
5
5
class =" nav-item"
8
8
<DropdownLink v-if =" item.type === 'links'" :item =" item" />
9
9
<NavLink v-else :item =" item" />
10
10
</div >
11
- <!-- github link -->
12
- <a v-if =" githubLink "
13
- :href =" githubLink "
14
- class =" github -link"
11
+ <!-- repo link -->
12
+ <a v-if =" repoLink "
13
+ :href =" repoLink "
14
+ class =" repo -link"
15
15
target =" _blank"
16
16
rel =" noopener noreferrer" >
17
- GitHub
17
+ {{ repoLabel }}
18
18
<OutboundLink />
19
19
</a >
20
20
</nav >
@@ -69,14 +69,19 @@ export default {
69
69
})
70
70
}))
71
71
},
72
- githubLink () {
73
- const { repo } = this .$site .themeConfig
72
+ repoLink () {
73
+ const repo = ' https://gitlab.my-company.local/my-team/github/our-product'
74
+ // const { repo } = this.$site.themeConfig
74
75
if (repo) {
75
76
return / ^ https? :/ .test (repo)
76
77
? repo
77
78
: ` https://github.com/${ repo} `
78
79
}
79
- }
80
+ },
81
+ repoLabel () {
82
+ const repoHost = this .repoLink .match (/ ^ https? :\/\/ [^ /] + / )[0 ] || ' github' ;
83
+ return [' GitHub' , ' GitLab' , ' Bitbucket' ].find (platform => repoHost .toLowerCase ().includes (platform .toLowerCase ()));
84
+ },
80
85
},
81
86
methods: {
82
87
isActive
You can’t perform that action at this time.
0 commit comments