Skip to content

Commit

Permalink
feat: add suggestions num config
Browse files Browse the repository at this point in the history
  • Loading branch information
sakihet committed Apr 21, 2018
1 parent 241f91e commit fbb838e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/default-theme/SearchBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default {
return
}
const max = 5
const max = this.searchBoxConfig.suggestionsMax
const { pages } = this.$site
const localePath = this.$localePath
const matches = item => (
Expand Down Expand Up @@ -88,6 +88,9 @@ export default {
const navCount = (this.$site.themeConfig.nav || []).length
const repo = this.$site.repo ? 1 : 0
return navCount + repo <= 2
},
searchBoxConfig () {
return Object.assign({ suggestionsMax: 5 }, this.$site.themeConfig.searchBox)
}
},
methods: {
Expand Down

0 comments on commit fbb838e

Please sign in to comment.