Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docsearch guide with key concepts for config.json #107

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs-site/content/guide/docsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ In fact, the search bar you see on Typesense's own documentation site is built w
Typesense's customized version of DocSearch is made up of two components:

1. [typesense-docsearch-scraper](https://github.com/typesense/typesense-docsearch-scraper) - Scraper that scans your documentation site and indexes the content in Typesense.
1. [typesense-docsearch.js](https://github.com/typesense/typesense-docsearch.js) - Javascript library that adds a search bar to your documentation site, that uses the index built by the DocSearch scraper.
2. [typesense-docsearch.js](https://github.com/typesense/typesense-docsearch.js) - Javascript library that adds a search bar to your documentation site, that uses the index built by the DocSearch scraper.

## Step 1: Set up DocSearch Scraper

Expand All @@ -22,6 +22,11 @@ Follow the official [DocSearch documentation](https://docsearch.algolia.com/docs

You can use one of those as templates to create your own `config.js`, pointing to your documentation site.

#### Key Concepts

- Docsearch organizes the scraped information using records called `text`, `lvl0`, `lvl1`, `lvl2`...`lvl6`, which usually map to the main content and and header elements within most web articles.
- `text` and `lvlX` records can be queried using CSS selectors or xpath queries.

### Run the Scraper

The easiest way to run the scraper is using Docker.
Expand Down