Skip to content

Commit 8959c29

Browse files
authored
fix: support alauda-ru preset (#67)
1 parent 4caf315 commit 8959c29

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.changeset/slow-moles-relax.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@alauda/doom": patch
3+
---
4+
5+
fix: support alauda-ru preset

src/cli/load-config.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ const ALAUDA_ALGOLIA_OPTIONS: AlgoliaOptions = {
104104
indexName: 'docs_alauda_io_xn35q5jlsv_pages',
105105
}
106106

107+
const ALAUDA_RU_ALGOLIA_OPTIONS: AlgoliaOptions = {
108+
appId: 'GBNIJIGQ50',
109+
apiKey: '786fa6da36fe76777d688387c0520c5b',
110+
indexName: 'docs_alauda_io_gbnijigq50_pages',
111+
}
112+
107113
const getCommonConfig = async ({
108114
config,
109115
root,
@@ -138,7 +144,7 @@ const getCommonConfig = async ({
138144
exclude?: string[]
139145
redirect?: 'auto' | 'never' | 'only-default-lang'
140146
editRepo?: boolean | string
141-
algolia?: boolean | 'alauda'
147+
algolia?: boolean | 'alauda' | 'alauda-ru'
142148
siteUrl?: boolean
143149
}): Promise<UserConfig> => {
144150
const fallbackToZh = 'lang' in config && !config.lang
@@ -217,7 +223,9 @@ const getCommonConfig = async ({
217223

218224
const algoliaOptions =
219225
((algolia && config.algolia) ??
220-
(algolia === 'alauda' && ALAUDA_ALGOLIA_OPTIONS)) ||
226+
(algolia === 'alauda'
227+
? ALAUDA_ALGOLIA_OPTIONS
228+
: algolia === 'alauda-ru' && ALAUDA_RU_ALGOLIA_OPTIONS)) ||
221229
null
222230

223231
return {

0 commit comments

Comments
 (0)