Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/slow-moles-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@alauda/doom": patch
---

fix: support alauda-ru preset
12 changes: 10 additions & 2 deletions src/cli/load-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ const ALAUDA_ALGOLIA_OPTIONS: AlgoliaOptions = {
indexName: 'docs_alauda_io_xn35q5jlsv_pages',
}

const ALAUDA_RU_ALGOLIA_OPTIONS: AlgoliaOptions = {
appId: 'GBNIJIGQ50',
apiKey: '786fa6da36fe76777d688387c0520c5b',
indexName: 'docs_alauda_io_gbnijigq50_pages',
}

const getCommonConfig = async ({
config,
root,
Expand Down Expand Up @@ -138,7 +144,7 @@ const getCommonConfig = async ({
exclude?: string[]
redirect?: 'auto' | 'never' | 'only-default-lang'
editRepo?: boolean | string
algolia?: boolean | 'alauda'
algolia?: boolean | 'alauda' | 'alauda-ru'
siteUrl?: boolean
}): Promise<UserConfig> => {
const fallbackToZh = 'lang' in config && !config.lang
Expand Down Expand Up @@ -217,7 +223,9 @@ const getCommonConfig = async ({

const algoliaOptions =
((algolia && config.algolia) ??
(algolia === 'alauda' && ALAUDA_ALGOLIA_OPTIONS)) ||
(algolia === 'alauda'
? ALAUDA_ALGOLIA_OPTIONS
: algolia === 'alauda-ru' && ALAUDA_RU_ALGOLIA_OPTIONS)) ||
null

return {
Expand Down