diff --git a/.changeset/slow-moles-relax.md b/.changeset/slow-moles-relax.md new file mode 100644 index 00000000..31ae841b --- /dev/null +++ b/.changeset/slow-moles-relax.md @@ -0,0 +1,5 @@ +--- +"@alauda/doom": patch +--- + +fix: support alauda-ru preset diff --git a/src/cli/load-config.ts b/src/cli/load-config.ts index 7c821f9f..a36c9a5c 100644 --- a/src/cli/load-config.ts +++ b/src/cli/load-config.ts @@ -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, @@ -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 => { const fallbackToZh = 'lang' in config && !config.lang @@ -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 {