Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ayan4m1/gatsby-plugin-algolia-docsearch-options
A fork of gatsby-plugin-algolia-docsearch to allow configuration of DocSearch from the gatsby-config.js
https://github.com/ayan4m1/gatsby-plugin-algolia-docsearch-options
algolia gatsby gatsby-plugin library
Last synced: about 1 month ago
JSON representation
A fork of gatsby-plugin-algolia-docsearch to allow configuration of DocSearch from the gatsby-config.js
- Host: GitHub
- URL: https://github.com/ayan4m1/gatsby-plugin-algolia-docsearch-options
- Owner: ayan4m1
- License: mit
- Created: 2020-01-21T00:24:03.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-15T07:16:08.000Z (about 1 month ago)
- Last Synced: 2024-12-15T08:17:20.661Z (about 1 month ago)
- Topics: algolia, gatsby, gatsby-plugin, library
- Language: JavaScript
- Homepage:
- Size: 4.44 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gatsby-plugin-algolia-docsearch-options
A fork of [gatsby-plugin-algolia-docsearch](https://github.com/ironstar-io/gatsby-plugin-algolia-docsearch) to allow configuration of DocSearch from the gatsby-config.js.
## requirements
- Node 20+
- Gatsby 5.x
- React 18.x## usage
You should already have gatsby and react installed.
Start off by installing this package and its peer dependencies:
> npm i --save gatsby-plugin-algolia-docsearch-options [email protected]
Then add the following to your gatsby-config.js:
```js
{
resolve: 'gatsby-plugin-algolia-docsearch-options',
options: {
apiKey: process.env.API_KEY,
indexName: 'changeme',
inputSelector: '#docsearch-input'
}
}
```It is recommended to source your API key from a "secret" location (i.e. not checked in to source control), and you should also use the read-only API key from Algolia for extra safety.
For the full list of available options, refer to the [@docsearch/js documentation](https://docsearch.algolia.com/docs/api).