Skip to content

Commit

Permalink
🐛 fix: Fix "donot show multi-language options when setted the sidebar…
Browse files Browse the repository at this point in the history
…GroupOrder" error

Signed-off-by: sqrtthree <[email protected]>
  • Loading branch information
linhe0x0 committed Jul 22, 2018
1 parent 3c376bf commit 2ec11bd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/Sidebar/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,13 @@ export default {
this.$localePath
)
const langTitle = config.get(this.$site, 'selectText', this.$localePath) || 'other-languages'
if (groupOrderConfig) {
const result = groupOrderConfig.slice()
result.unshift('other-languages', 'home')
result.unshift(langTitle, 'home')
return result
} else {
return Object.keys(this.items)
Expand Down
11 changes: 11 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ module.exports = {
},
},
themeConfig: {
locales: {
'/': {
selectText: 'Languages',
label: 'English',
},
'/zh/': {
selectText: '选择语言',
label: '简体中文',
},
},

// Assumes GitHub. Can also be a full GitLab url.
repo: 'sqrthree/vuepress-theme-api',
// Customising the header label
Expand Down

0 comments on commit 2ec11bd

Please sign in to comment.