File tree Expand file tree Collapse file tree 5 files changed +20
-3
lines changed
Expand file tree Collapse file tree 5 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ module.exports = {
1616 PLACEHOLDER : 'readonly' ,
1717 LAYOUT : 'readonly' ,
1818 DEBUG : 'readonly' ,
19- ENABLE_DARK_MODE : 'readonly'
19+ ENABLE_DARK_MODE : 'readonly' ,
20+ CLIENT_AGENTS : 'readonly'
2021 } ,
2122 parserOptions : {
2223 parser : 'babel-eslint' ,
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ export default {
3030 hostUrl: HOST_URL ,
3131 apiKey: API_KEY ,
3232 indexUid: INDEX_UID ,
33+ clientAgents: CLIENT_AGENTS ,
3334 meilisearchOptions: {
3435 limit:
3536 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 11const path = require ( 'path' )
22
3+ const { constructClientAgents } = require ( './client_agents' )
4+
35module . exports = ( options ) => {
46 return {
57 alias : {
@@ -15,7 +17,8 @@ module.exports = (options) => {
1517 CROP_LENGTH : options . cropLength || 30 ,
1618 LAYOUT : options . layout || 'columns' ,
1719 DEBUG : options . debug || false ,
18- ENABLE_DARK_MODE : options . enableDarkMode || false
20+ ENABLE_DARK_MODE : options . enableDarkMode || false ,
21+ CLIENT_AGENTS : constructClientAgents ( options . clientAgents ) || [ ]
1922 }
2023 }
2124}
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ module.exports = {
1616 CROP_LENGTH : 30 ,
1717 LAYOUT : 'columns' ,
1818 DEBUG : false ,
19- ENABLE_DARK_MODE : false
19+ ENABLE_DARK_MODE : false ,
20+ CLIENT_AGENTS : [ ]
2021 }
2122}
You can’t perform that action at this time.
0 commit comments