1
0
Fork 0
📘 The easiest way to add search to your documentation.
Find a file
2015-12-16 11:42:36 +01:00
dev feat(styling): Set grayscale as default, add styling as external file 2015-12-15 12:32:57 +01:00
docs chore(release): add release process similar to instantsearch.js 2015-12-15 16:15:13 +01:00
scripts chore(release): add release process similar to instantsearch.js 2015-12-15 16:15:13 +01:00
src Merge pull request #13 from algolia/chore/release-process 2015-12-16 11:00:16 +01:00
test test(utils): Add tests for getSnippettedValue 2015-12-15 14:37:20 +01:00
.babelrc chore(skeleton): Provide basic library skeleton 2015-11-26 12:03:01 +01:00
.eslintignore chore(release): remove old references to es5-module 2015-12-16 11:42:36 +01:00
.eslintrc chore(skeleton): Provide basic library skeleton 2015-11-26 12:03:01 +01:00
.gitignore chore(release): remove old references to es5-module 2015-12-16 11:42:36 +01:00
.npmignore chore(skeleton): Provide basic library skeleton 2015-11-26 12:03:01 +01:00
.travis.yml chore(release): add release process similar to instantsearch.js 2015-12-15 16:15:13 +01:00
CONTRIBUTING.md docs(CONTRIBUTING): add contributing guide 2015-12-15 16:15:13 +01:00
index.js feat(main): Add main wrapper 2015-11-26 16:10:06 +01:00
npm-shrinkwrap.json chore(shrinkwrap): add shrinkwrap 2015-12-15 16:15:13 +01:00
package.json chore(release): remove old references to es5-module 2015-12-16 11:42:36 +01:00
README.md chore(release): add release process similar to instantsearch.js 2015-12-15 16:15:13 +01:00
webpack.config.jsdelivr.babel.js Update build and serve scripts and renamed to docsearch 2015-12-10 18:44:57 +01:00
webpack.dev.config.babel.js chore(skeleton): Provide basic library skeleton 2015-11-26 12:03:01 +01:00

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

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:

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