<a name="0.0.2"></a> ## 0.0.2 (2015-12-16) ### Bug Fixes * **colors:** Reduce number of colors ([125d1c7](https://github.com/algolia/docsearch/commit/125d1c7)) * **snippet:** Fix typo in method name ([751dfdb](https://github.com/algolia/docsearch/commit/751dfdb)) ### Features * **gh-pages:** Add gh-pages deploy script ([ab1a299](https://github.com/algolia/docsearch/commit/ab1a299)) * **main:** Add main wrapper ([bdac9dd](https://github.com/algolia/docsearch/commit/bdac9dd)) * **styling:** Set grayscale as default, add styling as external file ([5d8cca8](https://github.com/algolia/docsearch/commit/5d8cca8))
2.6 KiB
Table of Contents generated with DocToc
- docsearch
- Usage
- Examples
- How do I get an
apiKeyandindexName? - How does it work?
- Development workflow
docsearch
Add a search autocomplete to any documentation.
Currently on-demand, send an email to docsearch@algolia.com if you want documentation search on your website.
Usage
<link rel="stylesheet" href="//cdn.jsdelivr.net/docsearch.js/0/docsearch.min.css" />
<script src="//cdn.jsdelivr.net/docsearch.js/0/docsearch.min.js"></script>
documentationSearch({
apiKey: apiKey, // Mandatory
indexName: indexName, // Mandatory
inputSelector: '#search-input' // Mandatory
});
Examples
- http://eslint.org/
- https://bootstrap.algolia.com/
- https://reactjs.algolia.com/
- https://babeljs.algolia.com/
How do I get an apiKey and indexName?
Send us an email with the url of the documentation website you would like to add search to.
How does it work?
The JavaScript library is a wrapper on top of our autocomplete.js library, along with default CSS styling of the dropdown.
The indexing of the website data itself is currently done by an internal tool (to be released).
Indexing of websites using docsearch takes places every day.
Development workflow
Local example
We use a simple documentation example website as a way to develop the docsearch.js library.
Requirements:
- Node.js
- npm@2
npm run dev
# open http://localhost:8080
Documentation website
This is the Jekyll instance running at https://community.algolia.com/docsearch.
Requirements:
npm run dev:docs
# open http://localhost:4000/docsearch/
MacOS
If you are using brew and you had brew install openssl, you may need to configure the build path of eventmachine with
bundle config build.eventmachine --with-cppflags=-I$(brew --prefix openssl)/include