diff --git a/versions/3.8/.vitepress/config/index.ts b/versions/3.8/.vitepress/config/index.ts index fcab5171f..4c1a0fd29 100644 --- a/versions/3.8/.vitepress/config/index.ts +++ b/versions/3.8/.vitepress/config/index.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'vitepress' +import { defineConfig, mergeConfig } from 'vitepress' import { shared } from '../../../../@config/shared' // 每个语言的配置 @@ -10,7 +10,7 @@ import { nav } from '../../../../@config/shared'; import menusEN from '../../en/summary.json' with {type: 'json'}; import menusZH from '../../zh/summary.json' with {type: 'json'}; -import { version } from './version.ts'; +import { version, algoliaAppid, algoliaSearchKey, algoliaIndexName } from './version.ts'; // 英文配置 const configEn = configEnFn(version); @@ -46,7 +46,7 @@ const zh = defineConfig({ } }) -export default defineConfig({ +export default mergeConfig(defineConfig({ ...shared, base: `/creator/${version}/manual/` , // `/${version}/` locales: { @@ -55,4 +55,15 @@ export default defineConfig({ en: { label: 'English', ...en }, zh: { label: '简体中文', ...zh } } -}) +}), defineConfig({ + themeConfig: { + search: { + provider: 'algolia', + options: { + appId: algoliaAppid, + apiKey: algoliaSearchKey, + indexName: algoliaIndexName, + } + } + } +})) diff --git a/versions/3.8/.vitepress/config/version.ts b/versions/3.8/.vitepress/config/version.ts index c3d5d3a44..7045b4bda 100644 --- a/versions/3.8/.vitepress/config/version.ts +++ b/versions/3.8/.vitepress/config/version.ts @@ -1 +1,6 @@ -export const version = '3.8'; \ No newline at end of file +export const version = '3.8'; + +// 每个版本 都有独立的 algolia 的配置 +export const algoliaAppid = 'EW77GMOM1P'; +export const algoliaSearchKey = '6e07ac11d829e8b52bec0ab0ca3da693'; +export const algoliaIndexName = 'cocos' \ No newline at end of file