docs: algolia appId is required (#608)

pull/615/head
郝晨光 2 years ago committed by GitHub
parent c1d964c295
commit 77efd933c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,11 +1,12 @@
# Theme Config: Algolia Search # 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 ```js
module.exports = { module.exports = {
themeConfig: { themeConfig: {
algolia: { algolia: {
appId: 'your_app_id',
apiKey: 'your_api_key', apiKey: 'your_api_key',
indexName: 'index_name' indexName: 'index_name'
} }
@ -19,6 +20,7 @@ For more options, check out [Algolia DocSearch's documentation](https://docsearc
module.exports = { module.exports = {
themeConfig: { themeConfig: {
algolia: { algolia: {
appId: 'your_app_id',
apiKey: 'your_api_key', apiKey: 'your_api_key',
indexName: 'index_name', indexName: 'index_name',
searchParameters: { searchParameters: {
@ -40,6 +42,7 @@ module.exports = {
// ... // ...
}, },
algolia: { algolia: {
appId: 'your_app_id',
apiKey: 'your_api_key', apiKey: 'your_api_key',
indexName: 'index_name' indexName: 'index_name'
} }

@ -121,7 +121,7 @@ export namespace DefaultTheme {
// algolia ------------------------------------------------------------------ // algolia ------------------------------------------------------------------
// partially copied from @docsearch/react/dist/esm/DocSearch.d.ts // partially copied from @docsearch/react/dist/esm/DocSearch.d.ts
export interface AlgoliaSearchOptions { export interface AlgoliaSearchOptions {
appId?: string appId: string
apiKey: string apiKey: string
indexName: string indexName: string
placeholder?: string placeholder?: string

Loading…
Cancel
Save