mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-30 01:17:07 +02:00
chore: prepare Algolia migration (#5632)
* prepare Algolia migration * Update website/docs/search.md Co-authored-by: Clément Vannicatte <20689156+shortcuts@users.noreply.github.com> Co-authored-by: Clément Vannicatte <20689156+shortcuts@users.noreply.github.com>
This commit is contained in:
parent
9d129631b6
commit
afff053cc9
2 changed files with 8 additions and 20 deletions
|
@ -75,7 +75,12 @@ module.exports = {
|
|||
// ...
|
||||
// highlight-start
|
||||
algolia: {
|
||||
apiKey: 'YOUR_API_KEY',
|
||||
// If Algolia did not provide you any appId, use 'BH4D9OD16A'
|
||||
appId: 'YOUR_APP_ID',
|
||||
|
||||
// Public API key: it is safe to commit it
|
||||
apiKey: 'YOUR_SEARCH_API_KEY',
|
||||
|
||||
indexName: 'YOUR_INDEX_NAME',
|
||||
|
||||
// Optional: see doc section below
|
||||
|
@ -131,24 +136,6 @@ When using `contextualSearch: true`, the contextual facet filters will be merged
|
|||
|
||||
:::
|
||||
|
||||
### Custom Application ID {#custom-application-id}
|
||||
|
||||
When [running your own](https://docsearch.algolia.com/docs/run-your-own/) DocSearch crawler, it is [required to set the `appId` configuration key](https://docsearch.algolia.com/docs/behavior/#appid) to your own Application ID. If left unset, the `appId` will fallback to the one used with the free, hosted version of Algolia DocSearch.
|
||||
|
||||
```jsx title="docusaurus.config.js"
|
||||
module.exports = {
|
||||
// ...
|
||||
themeConfig: {
|
||||
// ...
|
||||
// highlight-start
|
||||
algolia: {
|
||||
appId: 'YOUR_APP_ID',
|
||||
},
|
||||
// highlight-end
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
### Styling your Algolia search {#styling-your-algolia-search}
|
||||
|
||||
By default, DocSearch comes with a fine-tuned theme that was designed for accessibility, making sure that colors and contrasts respect standards.
|
||||
|
|
|
@ -318,7 +318,8 @@ const config = {
|
|||
}
|
||||
: undefined,
|
||||
algolia: {
|
||||
apiKey: '47ecd3b21be71c5822571b9f59e52544',
|
||||
appId: 'X1Z85QJPUV',
|
||||
apiKey: 'bf7211c161e8205da2f933a02534105a',
|
||||
indexName: 'docusaurus-2',
|
||||
contextualSearch: true,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue