1
0
Fork 0
📘 The easiest way to add search to your documentation.
Find a file
2015-12-18 19:02:55 +01:00
dev feat(styling): Set grayscale as default, add styling as external file 2015-12-15 12:32:57 +01:00
docs chore(website): home page responsiveness 2015-12-18 19:02:55 +01:00
scripts test(DocSearch): Add tests for constructor 2015-12-18 13:17:25 +01:00
src test(getAutocompleteSource): Add tests for source 2015-12-18 16:44:43 +01:00
test test(getAutocompleteSource): Add tests for source 2015-12-18 16:44:43 +01:00
.babelrc test(DocSearch): Add tests for constructor 2015-12-18 13:17:25 +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 test(DocSearch): Add tests for constructor 2015-12-18 13:17:25 +01:00
README.md chore(docs): updated README 2015-12-18 18:58:10 +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 test(DocSearch): Add tests for constructor 2015-12-18 13:17:25 +01:00

DocSearch

build status NPM version

We've created the fastest, easiest way to search within documentation. Check out our website to add an outstanding search to your documentation.

Table of Contents

Introduction

We're scratching our own itch here. As developers, we spend a lot of time reading documentation, and it isnt always easy to find the information we need.

Not blaming anyone here. Building a good search for a documentation is a complex challenge. We happen to have a lot of experience doing that, and we want to share it with the world. For free.

Just submit the form on the community.algolia.com/docsearch/ website and we'll get back to you with what you need to integrate your new search into your website.

  1. We'll crawl your documentation pages,
  2. We'll configure your search experience,
  3. and you'll need to add the a small JS/CSS code snippet to your website.

Setup

Once we've crawled your documentation website we'll send you the credentials you need to add the following code snippet to your website:

<link rel="stylesheet" href="//cdn.jsdelivr.net/docsearch.js/0/docsearch.min.css" />
<script type="text/javascript" src="//cdn.jsdelivr.net/docsearch.js/0/docsearch.min.js"></script>
<script type="text/javascript">
docSearch({
  apiKey: '<API_KEY>',
  indexName: '<INDEX_NAME>',
  inputSelector: '<YOUR_INPUT_DOM_SELECTOR>'
});
</script>

Customization

To customize the look & feel of the dropdown menu, you can either:

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