|
2 | 2 |
|
3 | 3 | ## Getting started
|
4 | 4 |
|
5 |
| -Because of AWS rate limits, this project currently depends on having the API documentation downloaded locally. To generate the JSON files locally, follow the excellent documentation over at [ember-jsonapi-docs](https://github.com/ember-learn/ember-jsonapi-docs#running-the-app). |
6 |
| - |
7 |
| -Once the json files have been generated using ember-jsonapi-docs, reindexing algolia is easy. |
| 5 | +### Setup |
8 | 6 |
|
9 | 7 | 1. `cp .env.example .env` - Copy the example environment configuration
|
10 | 8 | 2. Update the Algolia .env variables and path to the root of the generated API docs
|
11 | 9 | 3. `yarn` - Install dependencies
|
12 |
| -4. `yarn start` - Build the project using webpack and run the index script |
| 10 | + |
| 11 | +### Indexing API |
| 12 | + |
| 13 | +Because of AWS rate limits, this project currently depends on having the API documentation downloaded locally. To generate the JSON files locally, follow the excellent documentation over at [ember-jsonapi-docs](https://github.com/ember-learn/ember-jsonapi-docs#running-the-app). |
| 14 | + |
| 15 | +Once generated, use the following command to reindex algolia: |
| 16 | +`yarn start -p api` |
| 17 | + |
| 18 | +### Indexing Guides |
| 19 | + |
| 20 | +Guides json files are currently not stored somewhere, because they are built on demand using [broccoli-static-site-json](https://github.com/stonecircle/broccoli-static-site-json) in [guides-app](https://github.com/ember-learn/guides-app). |
| 21 | +To Generate the JSON files locally, clone [guides-app](https://github.com/ember-learn/guides-app), and run `ember build`. |
| 22 | + |
| 23 | +Once generated, use the following command to reindex algolia: |
| 24 | +`yarn start -p api` |
| 25 | + |
13 | 26 |
|
14 | 27 | ## .env variables
|
15 | 28 |
|
16 | 29 | 1. `ALGOLIA_APP_ID` - The Algolia application ID, found in "API Keys" section of the Algolia dashboard
|
17 | 30 | 2. `ALGOLIA_ADMIN_KEY` - The Algolia admin key, found in "API Keys" section of the Algolia dashboard
|
18 | 31 | 3. `API_DOCS_PATH` - The path to the root of the built documentation from [ember-jsonapi-docs](https://github.com/ember-learn/ember-jsonapi-docs#running-the-app)
|
| 32 | +3. `GUIDES_DOCS_PATH` - The path to the root of the built documentation from [guides-app](https://github.com/ember-learn/guides-app) |
19 | 33 | 4. `DEBUG` - Outputs helpful debug information
|
20 | 34 | 5. `DRIVER` - Controls the type of the script's output. Available options: `algolia`, `json`. `json` can be helpful for debugging the output of the script without wasting any indexing operations on `algolia`.
|
0 commit comments