File tree 2 files changed +5
-1
lines changed
docs/default-theme-config
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ next: false
216
216
---
217
217
```
218
218
219
- ## GitHub Repo and Edit Links
219
+ ## Git Repo and Edit Links
220
220
221
221
Providing ` themeConfig.repo ` auto generates a GitHub link in the navbar and "Edit this page" links at the bottom of each page.
222
222
@@ -226,6 +226,8 @@ module.exports = {
226
226
themeConfig: {
227
227
// Assumes GitHub. Can also be a full GitLab url.
228
228
repo: ' vuejs/vuepress' ,
229
+ // Customising the header label
230
+ repoLabel: ' Contribute!' ,
229
231
// if your docs are not at the root of the repo
230
232
docsDir: ' docs' ,
231
233
// optional, defaults to master
Original file line number Diff line number Diff line change @@ -78,6 +78,8 @@ export default {
78
78
}
79
79
},
80
80
repoLabel () {
81
+ if (this .$site .themeConfig .repoLabel ) return this .$site .themeConfig .repoLabel
82
+
81
83
const repoHost = this .repoLink .match (/ ^ https? :\/\/ [^ /] + / )[0 ] || ' github'
82
84
return [' GitHub' , ' GitLab' , ' Bitbucket' ].find (platform => {
83
85
return repoHost .toLowerCase ().includes (platform .toLowerCase ())
You can’t perform that action at this time.
0 commit comments