Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(v2): config for self-hosted docsearch crawler #4524

Merged
merged 1 commit into from
Mar 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions website/docs/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ module.exports = {
// Optional: see doc section below
contextualSearch: true,

// Optional: see doc section below
appId: 'YOUR_APP_ID',

// Optional: Algolia search parameters
searchParameters: {},

Expand Down Expand Up @@ -80,6 +83,24 @@ 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.
Expand Down