|
| 1 | +--- |
| 2 | +title: Talk to your docs |
| 3 | +description: Use the @docs context provider to index documentation sites for querying |
| 4 | +keywords: [documentation, indexing, context provider, embeddings] |
| 5 | +toc_max_heading_level: 5 |
| 6 | +--- |
| 7 | + |
| 8 | +The [`@docs` context provider](http://localhost:3000/customization/context-providers#documentation) allows you to interact with your documentation directly within Continue. This feature enables you to index any static site or GitHub markdown pages, making it easier to access and utilize your documentation while coding. |
| 9 | + |
| 10 | +## Enabling the `@docs` context provider |
| 11 | + |
| 12 | +To enable the `@docs` context provider, you need to add it to the list of context providers in your `config.json` file. |
| 13 | + |
| 14 | +```json |
| 15 | +{ |
| 16 | + "contextProviders": [ |
| 17 | + { "name": "docs" } |
| 18 | + ... |
| 19 | + ] |
| 20 | +} |
| 21 | +``` |
| 22 | + |
| 23 | +## How It Works |
| 24 | + |
| 25 | +The `@docs` context provider works by crawling specified documentation sites, generating embeddings, and storing them locally for you. This process allows for quick and efficient access to your documentation content. |
| 26 | + |
| 27 | +1. We crawl the specified documentation site |
| 28 | +2. Generate embeddings for the content |
| 29 | +3. Store the embeddings locally on your machine |
| 30 | +4. Provide access to the indexed content through the `@docs` context provider |
| 31 | + |
| 32 | +## Pre-indexed Documentation Sites |
| 33 | + |
| 34 | +We offer a selection of pre-indexed documentation sites for popular frameworks and libraries. You can view the list of [available pre-indexed sites and request additions here](https://github.com/continuedev/continue/blob/main/core/indexing/docs/preIndexedDocs.ts). |
| 35 | + |
| 36 | +## Indexing Your Own Documentation |
| 37 | + |
| 38 | +### Through the `@docs` Context Provider |
| 39 | + |
| 40 | +To add a single documentation site, we recommend going through the `@docs` context provider. |
| 41 | + |
| 42 | +1. Type `@docs` in the chat panel, hit enter |
| 43 | +2. Type "add" and select the "Add Docs" option |
| 44 | +3. Enter the required information into the dialog |
| 45 | + |
| 46 | +Indexing will begin upon submission. |
| 47 | + |
| 48 | +### Through `config.json` |
| 49 | + |
| 50 | +To add multiple documentation sites, we recommend adding them in bulk to your `config.json` file. Indexing will kick off upon file save. |
| 51 | + |
| 52 | +The configuration schema is as follows: |
| 53 | + |
| 54 | +```json |
| 55 | +"docs": [ |
| 56 | + { |
| 57 | + "title": "Continue", |
| 58 | + "startUrl": "https://docs.continue.dev/intro", |
| 59 | + "rootUrl": "https://docs.continue.dev", |
| 60 | + "faviconUrl": "https://docs.continue.dev/favicon.ico", |
| 61 | + "maxDepth": 3 |
| 62 | + } |
| 63 | +] |
| 64 | +``` |
| 65 | + |
| 66 | +- `title`: The name of the documentation site, used for identification in the UI. |
| 67 | +- `startUrl`: The URL where the indexing process should begin. |
| 68 | +- `rootUrl`: The base URL of the documentation site, used to determine which pages to index. |
| 69 | +- `faviconUrl`: The URL of the site's favicon, used for visual identification in the UI. |
| 70 | +- `maxDepth`: The maximum number of levels deep the indexer should crawl from the start URL. |
| 71 | + |
| 72 | +## FAQ |
| 73 | + |
| 74 | +### Why did my documentation site fail to index? |
| 75 | + |
| 76 | +Our current crawler is designed to work with static websites and may encounter issues with dynamic or JavaScript-heavy sites. If your documentation site failed to index, it's possible that it contains non-static elements that our crawler couldn't process. |
| 77 | + |
| 78 | +If you're experiencing issues with indexing a documentation site, please let us know. We're continuously improving our indexing capabilities and would appreciate your feedback to help us enhance the feature. |
| 79 | + |
| 80 | +<a href="https://discord.com/channels/1108621136150929458/1156679146932535376" className="button button--primary">Report Indexing Issues on Discord</a> |
| 81 | + |
| 82 | +### How often is the indexed content updated? |
| 83 | + |
| 84 | +Currently we do not automatically re-index your docs. If you would like to force a re-index, you can use the following command: `Continue: Docs Force Re-Index`. |
0 commit comments