Merge pull request #21 from btat/algolia-config

Add Algolia crawler config and info
This commit is contained in:
Billy Tat
2022-09-09 16:55:10 -07:00
committed by GitHub
2 changed files with 43 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# Algolia with Rancher Manager Documentation
The search index used by the Rancher Manager documentation is generated by [running our own crawler](https://docsearch.algolia.com/docs/legacy/run-your-own).
## Running the Crawler
To run the crawler, you'll need:
- A configuration file, which can be found [here](./config.json).
- An `.env` file, containing your credentials.
```
APPLICATION_ID=<app_id>
API_KEY=<key_with_write_permissions>
```
If you're running the crawler from the Docker image, run:
```
docker run -it --env-file=.env -e "CONFIG=$(cat ./config.json | jq -r tostring)" algolia/docsearch-scraper
```
Otherwise, follow [these instructions](https://docsearch.algolia.com/docs/legacy/run-your-own#running-the-crawler-from-the-code-base) if running the crawler using the code base.
+21
View File
@@ -0,0 +1,21 @@
{
"index_name": "docs_ranchermanager_rancher_io",
"sitemap_urls": ["http://docs.ranchermanager.rancher.io/sitemap.xml"],
"start_urls": ["http://docs.ranchermanager.rancher.io/"],
"selectors": {
"lvl0": "",
"lvl1": "article h1",
"lvl2": "article h2",
"lvl3": "article h3",
"lvl4": "article h4",
"lvl5": "article h5"
},
"custom_settings": {
"attributesForFaceting": [
"language",
"version",
"type",
"docusaurus_tag"
]
}
}