Skip to content

Commit 25fbb45

Browse files
Merge pull request circleci#4514 from aaronstillwell/add-search-to-local-dev
Add docs on working on search locally
2 parents b9f4521 + 19e4622 commit 25fbb45

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ release/tmp/CircleCI-Server-Operations-Guide.pdf
1717
src-api/build/
1818
src-config-builder/node_modules
1919
src-config-builder/build
20+
21+
# jekyll/_algolia_api_key can be used to store an algolia API key for
22+
# indexing the content. Useful for local development.
23+
*_algolia_api_key

docs/local-development.md

+10
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ Jekyll will build the site and start a web server, which can be viewed in your b
5252

5353
For more info on how to use Jekyll, check out [their docs](https://jekyllrb.com/docs/usage/).
5454

55+
## Working on search
56+
57+
If you want to work on the way search works on docs, follow the below instructions.
58+
59+
1. Create your own [algolia](https://www.algolia.com/) account to use for development
60+
1. Either take your admin API key for your account, or create an API key with write permissions. Create a file `./jekyll/_algolia_api_key` with the API key as its content.
61+
1. Update the `application_id` and `api_key` fields in the algolia section of `./jekyll/_config.yml` to match your own account. Do not commit these changes.
62+
1. Index the blog content to your own account via `bundle exec jekyll algolia`. If you have docs running in a container via docker compose, you can run `docker exec -it circleci-docs_jekyll_1 /bin/bash` to SSH into the container, cd into `./jekyll` and run the aforementioned command. You will see an error regarding the number of records being too high - this shouldn't matter for development, just be aware the search index you're using locally is incomplete.
63+
1. You should now be able to search your own index via the locally running docs.
64+
5565
## Editing Docs Locally
5666

5767
The docs site includes Bootstrap 3, JS, and CSS, so you'll have access to all of its [reusable components](https://v4-alpha.getbootstrap.com/components/alerts/).

0 commit comments

Comments
 (0)