-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from algolia/chore/scripts-docsearch.js-rename
chore(dev workflow, readme): consistency commit
- Loading branch information
Showing
9 changed files
with
60 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ dist/ | |
dist-es5-module/ | ||
npm-debug.log* | ||
docs/_site | ||
docs/.sass-cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
# Documentation Search | ||
# docsearch.js | ||
|
||
Add a search autocomplete to your documentation. | ||
Add a search autocomplete to any documentation. | ||
|
||
Currently on-demand, send an email to [[email protected]](mailto:[email protected]) | ||
if you want documentation search on your website. | ||
|
||
# Usage | ||
|
||
```html | ||
<link rel="stylesheet" href="//cdn.jsdelivr.net/documentationsearch.js/0/documentationsearch.min.css" /> | ||
<script src="//cdn.jsdelivr.net/documentationsearch.js/0/documentationsearch.min.js"></script> | ||
<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> | ||
``` | ||
|
||
```javascript | ||
```js | ||
documentationSearch({ | ||
apiKey: apiKey, // Mandatory | ||
indexName: indexName, // Mandatory | ||
|
@@ -24,27 +27,47 @@ documentationSearch({ | |
- https://reactjs.algolia.com/ | ||
- https://babeljs.algolia.com/ | ||
|
||
# How do I get my `apiKey` and `indexName`? | ||
# How do I get an `apiKey` and `indexName`? | ||
|
||
Just send us [an email](mailto:documentationsearch@algolia.com) with the url of | ||
the documentation you would like to search, and we'll this info back to you. | ||
Send us [an email](mailto:docsearch@algolia.com) 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](https://github.com/algolia/autocomplete.js) library, along | ||
with default CSS styling of the dropdown. | ||
|
||
The indexing of the data itself is currently done by an internal tool (we will | ||
release it later), that runs every hour. | ||
The indexing of the website data itself is currently done by an internal tool (to be released). | ||
|
||
Indexing of docsearch.js linked websites 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](https://nodejs.org/en/) | ||
- npm@2 | ||
|
||
```sh | ||
npm run dev | ||
# open http://localhost:8080 | ||
``` | ||
|
||
## Documentation website | ||
|
||
# Development | ||
This is the [Jekyll](https://jekyllrb.com/) instance running at https://community.algolia.com/docsearch.js. | ||
|
||
You need [ruby](https://www.ruby-lang.org/en/), [bundler](http://bundler.io/). | ||
Requirements: | ||
- [Ruby](https://www.ruby-lang.org/en/) | ||
- [Bundler](http://bundler.io/) | ||
|
||
```sh | ||
bundle install | ||
bundle exec guard | ||
npm run dev:docs | ||
# open http://localhost:4000/docsearch.js/ | ||
``` | ||
|
||
## MacOS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
{ | ||
"name": "documentationsearch.js", | ||
"name": "docsearch.js", | ||
"version": "0.0.1", | ||
"description": "Add an autocomplete dropdown to your documentation", | ||
"main": "dist-es5-module/index.js", | ||
"scripts": { | ||
"dev": "./scripts/dev", | ||
"dev:docs": "./scripts/dev-docs", | ||
"shrinkwrap": "npm-shrinkwrap --dev", | ||
"prepublish": "NODE_ENV=production npm run build", | ||
"build": "./scripts/build", | ||
|
@@ -18,7 +19,7 @@ | |
}, | ||
"author": "Algolia <[email protected]> (https://github.com/algolia/)", | ||
"license": "MIT", | ||
"repository": "algolia/documentationsearch.js", | ||
"repository": "algolia/docsearch.js", | ||
"devDependencies": { | ||
"autoprefixer": "^6.1.2", | ||
"babel": "^5.8.29", | ||
|
@@ -31,9 +32,10 @@ | |
"eslint": "^1.6.0", | ||
"eslint-config-airbnb": "^0.1.0", | ||
"eslint-config-algolia": "^4.2.0", | ||
"eslint-plugin-algolia": "^1.5.0", | ||
"eslint-plugin-react": "^3.5.1", | ||
"expect": "^1.13.0", | ||
"gh-pages": "^0.5.0", | ||
"gh-pages": "^0.8.0", | ||
"jsdom": "^7.1.1", | ||
"json": "^9.0.3", | ||
"mocha": "^2.3.4", | ||
|
@@ -51,8 +53,9 @@ | |
"peerDependencies": {}, | ||
"dependencies": { | ||
"algoliasearch": "^3.9.2", | ||
"autocomplete.js": "^0.14.1", | ||
"autocomplete.js": "^0.16.0", | ||
"hogan.js": "^3.0.2", | ||
"npm-zepto": "^1.1.7", | ||
"to-factory": "^1.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,3 @@ webpack-dev-server \ | |
onchange './src/styles/*.scss' -- npm run build:css & \ | ||
|
||
wait | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ev # exit when error | ||
|
||
cd docs && \ | ||
bundle install && \ | ||
bundle exec guard -i & \ | ||
npm run dev & \ | ||
wait |