Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fbb838e

Browse files
committedApr 21, 2018
feat: add suggestions num config
1 parent 241f91e commit fbb838e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

Diff for: ‎lib/default-theme/SearchBox.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default {
5151
return
5252
}
5353
54-
const max = 5
54+
const max = this.searchBoxConfig.suggestionsMax
5555
const { pages } = this.$site
5656
const localePath = this.$localePath
5757
const matches = item => (
@@ -88,6 +88,9 @@ export default {
8888
const navCount = (this.$site.themeConfig.nav || []).length
8989
const repo = this.$site.repo ? 1 : 0
9090
return navCount + repo <= 2
91+
},
92+
searchBoxConfig () {
93+
return Object.assign({ suggestionsMax: 5 }, this.$site.themeConfig.searchBox)
9194
}
9295
},
9396
methods: {

0 commit comments

Comments
 (0)
Please sign in to comment.