1
0
Fork 0
This commit is contained in:
s-pace 2018-11-27 15:26:31 +01:00 committed by Tim Carry
parent ef34acf24a
commit a94a777e10
3 changed files with 10 additions and 10 deletions

View file

@ -60,8 +60,8 @@ docsearch({
## `queryHook`
This method will be called on every keystroke to transform the typed keywords
before querying Algolia. By default, it does not do anything, but we
provide this hook for you to add your own logic if needed.
before querying Algolia. By default, it does not do anything, but we provide
this hook for you to add your own logic if needed.
```javascript
docsearch({

View file

@ -606,11 +606,11 @@ DocSearch to index all your content.
You can override the user agent used to crawl your website. By default, this
value is:
`'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36'`
`'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/70.0.3538.110 Safari/537.36'`
```json
{
"user_agent": "Googlebot"
"user_agent": "DocSeach Bot"
}
```

View file

@ -5,8 +5,8 @@ title: Run your own
The version of DocSearch we provide for free is one hosted on our own servers,
running every 24 hours. To update your results with more control, if you are not
compliant with our checklist, or to index content sitting behind a firewall,
you might want to run the crawler yourself.
compliant with our checklist, or to index content sitting behind a firewall, you
might want to run the crawler yourself.
The whole code of DocSearch is open source, and we packaged it as a Docker image
to make this even easier for you to use.
@ -46,8 +46,8 @@ API_KEY=YOUR_API_KEY
## Create a new config
To create a config, run `./docsearch bootstrap`. A prompt will ask you for
some information and will then output a JSON config you can use as a base.
To create a config, run `./docsearch bootstrap`. A prompt will ask you for some
information and will then output a JSON config you can use as a base.
```sh
$ ./docsearch bootstrap
@ -84,8 +84,8 @@ on to start the crawl. You can find the complete list of available options in
Now that you have your environment variables set, you can run the crawler
according to your config.
Running `pipenv shell` will enable your virtual environment. From there, you can run one crawl with the following command:
code source
Running `pipenv shell` will enable your virtual environment. From there, you can
run one crawl with the following command: code source
```sh
$ ./docsearch run /path/to/your/config.json