📘 The easiest way to add search to your documentation.
| .circleci | ||
| .github | ||
| cypress | ||
| packages | ||
| scripts | ||
| .editorconfig | ||
| .env.sample | ||
| .eslintignore | ||
| .eslintrc.js | ||
| .gitignore | ||
| .nvmrc | ||
| .percy.json | ||
| .prettierignore | ||
| .prettierrc | ||
| .stylelintrc.json | ||
| babel.config.js | ||
| bundlesize.config.json | ||
| CHANGELOG.md | ||
| CONTRIBUTING.md | ||
| cypress.json | ||
| global.d.ts | ||
| jest.config.js | ||
| lerna.json | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| renovate.json | ||
| rollup.base.config.js | ||
| ship.config.js | ||
| tsconfig.declaration.json | ||
| tsconfig.json | ||
| yarn.lock | ||
DocSearch crawls your documentation, pushes the content to an Algolia index and provides a dropdown search experience on your website.
Check out our website for a complete explanation and documentation.
Usage
Don't have your Algolia credentials yet? Apply to DocSearch!
1. Import the library as an ECMAScript module:
npm install @docsearch/js@alpha
# or
yarn add @docsearch/js@alpha
import docsearch from '@docsearch/js';
1–bis. Or with a script tag (at the end of the body):
<script src="https://cdn.jsdelivr.net/@docsearch/js@alpha"></script>
2. Use the library:
docsearch({
container: '#docsearch',
indexName: 'YOUR_INDEX_NAME',
apiKey: 'YOUR_API_KEY',
});
3. Customize the color scheme.
Related projects
DocSearch is made of the following repositories:
- algolia/docsearch: DocSearch source code.
- algolia/docsearch-website: DocSearch website and documentation.
- algolia/docsearch-configs: DocSearch websites configurations that DocSearch powers.
- algolia/docsearch-scraper: DocSearch crawler that extracts data from your documentation.