1
0
Fork 0
📘 The easiest way to add search to your documentation.
Find a file
2015-12-16 19:09:13 +01:00
dev feat(styling): Set grayscale as default, add styling as external file 2015-12-15 12:32:57 +01:00
docs Docs: add a "Join the beta" form. 2015-12-16 18:40:08 +01:00
scripts chore(release): fix update website script 2015-12-16 12:28:55 +01:00
src v0.0.6 2015-12-16 12:13:30 +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 Ignore dist files 2015-12-16 19:09:13 +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
CHANGELOG.md v0.0.6 2015-12-16 12:13:30 +01:00
CONTRIBUTING.md chore(release): git add CONTRIBUTING too 2015-12-16 11:53:29 +01:00
index.js feat(main): Add main wrapper 2015-11-26 16:10:06 +01:00
npm-shrinkwrap.json v0.0.6 2015-12-16 12:13:30 +01:00
package.json v0.0.6 2015-12-16 12:13:30 +01:00
README.md v0.0.2 2015-12-16 11:51:09 +01:00
webpack.config.jsdelivr.babel.js chore(build): allow npm link and inject NODE_ENV 2015-12-16 12:04:01 +01:00
webpack.dev.config.babel.js chore(build): allow npm link and inject NODE_ENV 2015-12-16 12:04:01 +01:00

Table of Contents generated with DocToc

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