File tree 5 files changed +20
-3
lines changed 5 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ module.exports = {
16
16
PLACEHOLDER : 'readonly' ,
17
17
LAYOUT : 'readonly' ,
18
18
DEBUG : 'readonly' ,
19
- ENABLE_DARK_MODE : 'readonly'
19
+ ENABLE_DARK_MODE : 'readonly' ,
20
+ CLIENT_AGENTS : 'readonly'
20
21
} ,
21
22
parserOptions : {
22
23
parser : 'babel-eslint' ,
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ export default {
30
30
hostUrl: HOST_URL ,
31
31
apiKey: API_KEY ,
32
32
indexUid: INDEX_UID ,
33
+ clientAgents: CLIENT_AGENTS ,
33
34
meilisearchOptions: {
34
35
limit:
35
36
MAX_SUGGESTIONS || this .$site .themeConfig .searchMaxSuggestions || 5 ,
Original file line number Diff line number Diff line change
1
+ const { version } = require ( './package.json' )
2
+
3
+ const constructClientAgents = ( clientAgents = [ ] ) => {
4
+ const vuepressAgents = `Meilisearch Vuepress (v${ version } )`
5
+
6
+ return clientAgents . concat ( vuepressAgents )
7
+ }
8
+
9
+ module . exports = {
10
+ constructClientAgents
11
+ }
Original file line number Diff line number Diff line change 1
1
const path = require ( 'path' )
2
2
3
+ const { constructClientAgents } = require ( './client_agents' )
4
+
3
5
module . exports = ( options ) => {
4
6
return {
5
7
alias : {
@@ -15,7 +17,8 @@ module.exports = (options) => {
15
17
CROP_LENGTH : options . cropLength || 30 ,
16
18
LAYOUT : options . layout || 'columns' ,
17
19
DEBUG : options . debug || false ,
18
- ENABLE_DARK_MODE : options . enableDarkMode || false
20
+ ENABLE_DARK_MODE : options . enableDarkMode || false ,
21
+ CLIENT_AGENTS : constructClientAgents ( options . clientAgents ) || [ ]
19
22
}
20
23
}
21
24
}
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ module.exports = {
16
16
CROP_LENGTH : 30 ,
17
17
LAYOUT : 'columns' ,
18
18
DEBUG : false ,
19
- ENABLE_DARK_MODE : false
19
+ ENABLE_DARK_MODE : false ,
20
+ CLIENT_AGENTS : [ ]
20
21
}
21
22
}
You can’t perform that action at this time.
0 commit comments