Skip to content

Commit c1dea0a

Browse files
committed
Conditionally add algolia search config
1 parent 257e95a commit c1dea0a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

guide/.vuepress/config.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ const config = {
1919
yuu: {
2020
colorThemes: ['blue', 'red'],
2121
},
22-
algolia: {
23-
apiKey: 'c8d9361fb8403f7c5111887e0edf4b5e',
24-
indexName: 'discordjs',
25-
},
2622
repo: 'discordjs/guide',
2723
docsDir: 'guide',
2824
sidebarDepth: 3,
@@ -56,4 +52,11 @@ for (const group of Object.values(config.themeConfig.sidebar)) {
5652
}
5753
}
5854

55+
if (process.env.NODE_ENV === 'production') {
56+
config.themeConfig.algolia = {
57+
apiKey: 'c8d9361fb8403f7c5111887e0edf4b5e',
58+
indexName: 'discordjs',
59+
};
60+
}
61+
5962
module.exports = config;

0 commit comments

Comments
 (0)