From 77efd933c3e8f780524246154e4040ce04941bc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=9D=E6=99=A8=E5=85=89?= <2293885211@qq.com> Date: Fri, 6 May 2022 02:13:08 -0500 Subject: [PATCH] docs: algolia appId is required (#608) --- docs/config/algolia-search.md | 5 ++++- types/default-theme.d.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/config/algolia-search.md b/docs/config/algolia-search.md index 28e4e5fd..132b0a56 100644 --- a/docs/config/algolia-search.md +++ b/docs/config/algolia-search.md @@ -1,11 +1,12 @@ # Theme Config: Algolia Search -The `themeConfig.algolia` option allows you to use [Algolia DocSearch](https://docsearch.algolia.com). To enable it, you need to provide at least apiKey and indexName: +The `themeConfig.algolia` option allows you to use [Algolia DocSearch](https://docsearch.algolia.com). To enable it, you need to provide at least appId, apiKey and indexName: ```js module.exports = { themeConfig: { algolia: { + appId: 'your_app_id', apiKey: 'your_api_key', indexName: 'index_name' } @@ -19,6 +20,7 @@ For more options, check out [Algolia DocSearch's documentation](https://docsearc module.exports = { themeConfig: { algolia: { + appId: 'your_app_id', apiKey: 'your_api_key', indexName: 'index_name', searchParameters: { @@ -40,6 +42,7 @@ module.exports = { // ... }, algolia: { + appId: 'your_app_id', apiKey: 'your_api_key', indexName: 'index_name' } diff --git a/types/default-theme.d.ts b/types/default-theme.d.ts index d7284871..60a45fa7 100644 --- a/types/default-theme.d.ts +++ b/types/default-theme.d.ts @@ -121,7 +121,7 @@ export namespace DefaultTheme { // algolia ------------------------------------------------------------------ // partially copied from @docsearch/react/dist/esm/DocSearch.d.ts export interface AlgoliaSearchOptions { - appId?: string + appId: string apiKey: string indexName: string placeholder?: string