1
0
Fork 0

fix(docs): fix spelling, grammar, and formatting across docs (#2882)

- Fix typos and grammar across 18 docs files (curly apostrophe in code
  sample, verb agreement, possessives, missing punctuation, etc.)
- Capitalize proper nouns: JavaScript, DocSearch, Ask AI, LLM, Starlight
- Fix code sample syntax: missing trailing comma in record-extractor,
  missing semicolon in sidepanel advanced-use-cases
- Add missing Solution paragraph to AI-211 error entry in askai-errors
- Remove trailing colons from section headings (api.mdx, api-reference.mdx)
- Fix internal link in askai-markdown-indexing (.mdx extension removed)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Kim Pohas 2026-05-18 09:10:06 -07:00 committed by GitHub
parent f68e52251c
commit 047a769791
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 52 additions and 50 deletions

View file

@ -28,7 +28,7 @@ The container for the DocSearch search box. You can either pass a [CSS selector]
The environment in which your application is running.
This is useful if youre using DocSearch in a different context than window.
This is useful if youre using DocSearch in a different context than `window`.
</TabItem>
</Tabs>
@ -148,7 +148,7 @@ Your Algolia index name.
> `type: string` | `default: "Search docs"` | **optional**
The placeholder of the input of the DocSearch pop-up modal. Note: If you add a placeholder it will replace the dynamic placeholder based on askAi, It would be better to edit [translations](#translations)
The placeholder of the input of the DocSearch pop-up modal. Note: If you add a placeholder, it will replace the dynamic placeholder based on `askAi`. It would be better to edit [translations](#translations) instead.
## `askAi`
@ -174,7 +174,7 @@ docsearch({
});
```
or if you want to use different credentials for askAi and add search parameters
or if you want to use different credentials for `askAi` and add search parameters
```js
docsearch({
@ -216,7 +216,7 @@ docsearch({
/>
```
in case you want to use different credentials for askAi
in case you want to use different credentials for `askAi`
```jsx
<DocSearch

View file

@ -102,7 +102,7 @@ export function Search() {
The actual components MUST be rendered within the `<DocSearch>` Provider in order for them to communicate with the global state.
:::
This setup is slightly more involved with now rendering three different components:
This setup is slightly more involved with now rendering three different components:
- `<DocSearch>` is the parent element which controls and shares all state with the child components
- `<DocSearchButton />` is the actual button element that is rendered and triggers the DocSearch Modal to open
@ -144,7 +144,7 @@ export function Search() {
}
```
You can find more information on Ask AI, and it's setup in it's [dedicated docs][2].
You can find more information on Ask AI, and its setup in its [dedicated docs][2].
### Advanced
@ -234,7 +234,7 @@ export default function DynamicModal() {
### `<DocSearch />`
The `<DocSearch />` component from the `@docsearch/core` package is the main state handler for all of DocSearch.
It utilizes [React Context][1] to enable sharing it's state across nested components.
It utilizes [React Context][1] to enable sharing its state across nested components.
#### Props

View file

@ -24,7 +24,7 @@ This can happen when you have more than one URL pointing to the same content, fo
We recommend configuring canonical URLs on your website, you can read more on the ["Consolidate duplicate URLs" guide by Google](https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls).
Ultimately, it is possible to set set the [`exclusionPatterns`](https://www.algolia.com/doc/tools/crawler/apis/configuration/exclusion-patterns/) to all the patterns you want to exclude.
Ultimately, it is possible to set the [`exclusionPatterns`](https://www.algolia.com/doc/tools/crawler/apis/configuration/exclusion-patterns/) to all the patterns you want to exclude.
## Are the [`docsearch-scraper`](https://github.com/algolia/docsearch-scraper) and [`docsearch-configs`](https://github.com/algolia/docsearch-configs) repository still maintained?
@ -32,7 +32,7 @@ We've deprecated our legacy infrastructure, but you can still use it to [run you
## How to migrate
> Every owners should have received a migration email from Algolia with the details. If you were not part of the previous `index` owners, or the maintainer has changed, you can request access via [our support page](https://www.algolia.com/support/).
> Every owner should have received a migration email from Algolia with the details. If you were not part of the previous `index` owners, or the maintainer has changed, you can request access via [our support page](https://www.algolia.com/support/).
All the steps are detailed in the email you've received, but in order to use the new infrastructure you need to:
@ -84,7 +84,7 @@ You should use [the dedicated web interface][2] to make any changes to your inde
We did not remove access to the legacy DocSearch application (`BH4D9OD16A`) to give you the time to get familiar with our new infrastructure. `BH4D9OD16A` will remain available until the migration has been completed for all the DocSearch users.
## Search yield no results
## Search yields no results
If your search does not yield any results, but there is no error in [your browser developer tools](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools), there might be an issue with your index.
@ -96,7 +96,7 @@ We provide [config templates](/docs/templates) for many website generators, but
2. Your index settings are up to date (you'll see a banner in [the search preview](/docs/manage-your-crawls/#search-preview) if not)
The Crawler only applies `index settings` at index creation index, to keep the Algolia dashboard as the source of truth. If you have drastically changed your config, or moved to a website generator, we recommend you to delete your index from the Algolia dashboard before starting a new crawl.
The Crawler only applies `index settings` at index creation time, to keep the Algolia dashboard as the source of truth. If you have drastically changed your config, or moved to a website generator, we recommend you to delete your index from the Algolia dashboard before starting a new crawl.
## Can I delete my crawler?

View file

@ -90,7 +90,7 @@ Please reach out to our [support](https://algolia.com/support) team.
We recommend having a single Algolia application per project. Please [apply](https://dashboard.algolia.com/users/sign_up?selected_plan=docsearch&utm_source=docsearch.algolia.com&utm_medium=referral&utm_campaign=docsearch&utm_content=apply) if you'd like to use DocSearch in an other project of yours.
### Why ?
### Why?
The information of the initially applied project is used everywhere when we deploy your app:
@ -99,7 +99,7 @@ The information of the initially applied project is used everywhere when we depl
- The indices we generate
- The allowed domains of your Crawler
This allow us to easily scope issues when reaching out for support.
This allows us to easily scope issues when reaching out for support.
## Support
@ -123,7 +123,7 @@ Please be informed that while Algolia does not provide support for DocSearch its
- The Algolia Crawler, reach out [via the support page](https://algolia.com/support).
- The Algolia Dashboard, reach out [via the support page](https://algolia.com/support).
For any issue related to [the DocSearch UI library](https://github.com/algolia/docsearch), please open a [GitHub issues](https://github.com/algolia/docsearch/issues).
For any issue related to [the DocSearch UI library](https://github.com/algolia/docsearch), please open a [GitHub issue](https://github.com/algolia/docsearch/issues).
[1]: https://alg.li/discord
[2]: https://www.algolia.com/

View file

@ -1,7 +1,7 @@
---
id: examples
title: Examples and extensions
description: live demos showing how to use and extend docsearch beyond documentation-only use cases.
description: Live demos showing how to use and extend DocSearch beyond documentation-only use cases.
---
import { DocSearch } from '@docsearch/react';
@ -12,11 +12,11 @@ import BrowserOnly from '@docusaurus/BrowserOnly';
import '@docsearch/css/dist/style.css';
import '@docsearch/css/dist/sidepanel.css';
> These examples are interactive. click a button to open the modal and try a query.
> These examples are interactive. Click a button to open the modal and try a query.
## Basic keyword search
Use the default experience with your index credentials. this works great for typical docs, blogs, and any site with a docsearch-compliant index.
Use the default experience with your index credentials. This works great for typical docs, blogs, and any site with a DocSearch-compliant index.
```jsx
<DocSearch
@ -40,7 +40,7 @@ Use the default experience with your index credentials. this works great for typ
## Ask AI: ai-assisted answers
Add algolia askai to get synthesized answers grounded in your indexed content. you can scope the llm context using `searchParameters` like `facetFilters`, `filters`, `attributesToRetrieve`,`restrictSearchableAttributes`, and `distinct`.
Add Algolia Ask AI to get synthesized answers grounded in your indexed content. You can scope the LLM context using `searchParameters` like `facetFilters`, `filters`, `attributesToRetrieve`,`restrictSearchableAttributes`, and `distinct`.
```jsx
<DocSearch
@ -147,7 +147,7 @@ import '@docsearch/css/style.css';
## Custom hit rendering (`hitComponent`)
Replace the default hit markup to match your brand and layout. below is a minimal example of a custom component.
Replace the default hit markup to match your brand and layout. Below is a minimal example of a custom component.
```jsx
function CustomHit({ hit }) {
@ -343,9 +343,9 @@ const newTabNavigator = {
## Bring-your-own-data shape with `transformItems`
Docsearch is not limited to docsearch-like records. use `transformItems` to adapt any record shape into the internal structure docsearch expects. this lets you build search for apps, help centers, changelogs, or any custom content.
DocSearch is not limited to DocSearch-like records. Use `transformItems` to adapt any record shape into the internal structure DocSearch expects. This lets you build search for apps, help centers, changelogs, or any custom content.
the snippet below maps a non-standard record to the internal format. try it live:
The snippet below maps a non-standard record to the internal format. Try it live:
```jsx
<DocSearch
@ -424,5 +424,5 @@ the snippet below maps a non-standard record to the internal format. try it live
## Tips
- **Instrumentation**: enable `insights` to send usage analytics and iterate on relevance.
- **Ask AI scoping**: use `facetFilters`, `filters`, `attributesToRetrieve`, `restrictSearchableAttributes`, and `distinct` to control ai context and improve answer quality.
- **Customization**: use `hitComponent`, `transformItems`, and `translations` to make docsearch feel native to any product surface.
- **Ask AI scoping**: use `facetFilters`, `filters`, `attributesToRetrieve`, `restrictSearchableAttributes`, and `distinct` to control AI context and improve answer quality.
- **Customization**: use `hitComponent`, `transformItems`, and `translations` to make DocSearch feel native to any product surface.

View file

@ -6,7 +6,7 @@ We worked with **documentation website generators** to have DocSearch directly e
## Our great integrations
So, if you're using one of the following tools, checkout their documentation to see how to enable DocSearch on your website:
So, if you're using one of the following tools, check out their documentation to see how to enable DocSearch on your website:
- [Docusaurus v1][1] - [How to enable search][2]
- [Docusaurus v2 & v3][3] - [DocSearch adapter (recommended)][23] / [Using Algolia DocSearch][4]

View file

@ -57,7 +57,7 @@ From the [`editor`](#update-your-config), you have access to a `Search preview`
## URL tester
From the [`editor`](#update-your-config), your can use the URL tester to [debug selectors](https://www.algolia.com/doc/tools/crawler/getting-started/crawler-configuration/#debugging-selectors) or how we crawl your website.
From the [`editor`](#update-your-config), you can use the URL tester to [debug selectors](https://www.algolia.com/doc/tools/crawler/getting-started/crawler-configuration/#debugging-selectors) or how we crawl your website.
<div className="uil-ta-center">
<img

View file

@ -15,7 +15,7 @@ With the new version of the [DocSearch UI][1], we wanted to go further and provi
The DocSearch infrastructure now leverages the [Algolia Crawler][2]. We've teamed up with our friends and created a new [DocSearch helper][4], that extracts records as we were previously doing with our beloved [DocSearch scraper][3]!
The best part, is that you no longer need to install any tooling on your side if you want to maintain or update your index!
The best part is that you no longer need to install any tooling on your side if you want to maintain or update your index!
We now provide a web interface **[legacy][7]** or **[new](https://dashboard.algolia.com/crawler)** that will allow you to:
@ -44,7 +44,7 @@ You can find answers related to the DocSearch migration in our [Crawler FAQ page
## Config file key mapping
Below are the keys that can be found in the [`legacy` DocSearch configs][14] and their translation to an [Algolia Crawler config][16]. More detailed documentation of the Algolia Crawler can be found on the [the official documentation][15]
Below are the keys that can be found in the [`legacy` DocSearch configs][14] and their translation to an [Algolia Crawler config][16]. For more detailed information on the Algolia Crawler, see [the official documentation][15].
| `legacy` | `current` | description |
| --- | --- | --- |

View file

@ -26,7 +26,7 @@ We refreshed a few translations keys to make their purpose much clearer:
| SearchBoxTranslations | `cancelButtonAriaLabel` | `closeButtonAriaLabel` |
| FooterTranslations | `searchByText` | `poweredByText` |
Find the full list of translations in the [API documentation](/docs/api#translations)
Find the full list of translations in the [API documentation](/docs/api#translations).
## Integrating Ask AI with DocSearch v4
@ -88,7 +88,7 @@ For full details on endpoint security, caching strategies, and infrastructure, s
## Support and Resources
* **Ask AI documentation**: Learn everything about Algolia Ask AI ([Documentation](/#)).
* **DocSearch Playground**: Interactive environment to test DocSearch configurations ([Docsearch Playground](https://community.algolia.com/docsearch-playground/)).
* **DocSearch Playground**: Interactive environment to test DocSearch configurations ([DocSearch Playground](https://community.algolia.com/docsearch-playground/)).
* **Community & Support**: Reach out through the [Algolia Discord](https://alg.li/discord).
Following this guide ensures a smooth transition to DocSearch v4, unlocking the full capabilities of Algolia's powerful AI-driven search features.

View file

@ -77,7 +77,7 @@ recordExtractor: ({ $, helpers }) => {
// `.exists h1` will be selected if `.exists-probably h1` does not exists.
lvl0: {
selectors: [".exists-probably h1", ".exists h1"],
}
},
lvl1: "article h2",
lvl2: "article h3",
lvl3: "article h4",
@ -131,7 +131,7 @@ recordExtractor: ({ $, helpers }) => {
_These selectors also support [`defaultValue`](#provide-raw-text-defaultvalue) and [fallback selectors](#provide-fallback-selectors)_
You might want to index content that will be used as filters in your frontend (e.g. `version` or `lang`), you can defined any custom variable to the `recordProps` object to add them to your Algolia records:
You might want to index content that will be used as filters in your frontend (e.g. `version` or `lang`), you can define any custom variable to the `recordProps` object to add them to your Algolia records:
```js
recordExtractor: ({ helpers }) => {
@ -209,7 +209,7 @@ You can view the computed weight directly from the Algolia dashboard (dashboard.
### Reduce the number of records
If you encounter the `Extractors returned too many records` error when your page outputs more than 750 records. The [`aggregateContent`](#aggregatecontent) option helps you reducing the number of records at the `content` level of the extractor.
If you encounter the `Extractors returned too many records` error when your page outputs more than 750 records, the [`aggregateContent`](#aggregatecontent) option helps you reduce the number of records at the `content` level of the extractor.
```js
{
@ -236,7 +236,7 @@ If you encounter the `Extractors returned too many records` error when your page
### Reduce the record size
If you encounter the `Records extracted are too big` error when crawling your website, it's mostly because there was too many informations in your records, or that your page is too big. The [`recordVersion`](#recordversion) option helps you reducing the records size by removing informations that are only used with [DocSearch v2](/docs/legacy/dropdown).
If you encounter the `Records extracted are too big` error when crawling your website, it is usually because there is too much information in your records, or because your page is too large. The [`recordVersion`](#recordversion) option helps you reduce the records size by removing informations that are only used with [DocSearch v2](/docs/legacy/dropdown).
```js
{
@ -317,7 +317,7 @@ Custom variables are used to [`filter your search`](/docs/v3/docsearch#filtering
> `type: 'v3' | 'v2'` | default: `v2` | **optional**
This option remove content from the Algolia records that are only used for [DocSearch v2](/docs/legacy/dropdown). If you are using [the latest version of DocSearch](/docs/v3/docsearch), you can [set it to `v3`](#reduce-the-record-size).
This option removes content from the Algolia records that are only used for [DocSearch v2](/docs/legacy/dropdown). If you are using [the latest version of DocSearch](/docs/v3/docsearch), you can [set it to `v3`](#reduce-the-record-size).
### `indexHeadings`

View file

@ -2,7 +2,7 @@
title: Required configuration
---
This section, gives you the best practices to optimize our crawl. Adopting this following specification is required to let our crawler build the best experience from your website. You will need to update your website and follow these rules.
This section gives you the best practices to optimize our crawl. Adopting the following specification is required to let our crawler build the best experience from your website. You will need to update your website and follow these rules.
:::info
@ -112,7 +112,7 @@ new Crawler({
### Overview of a clear layout
A website implementing these good practises will look simple and crystal clear. It can have this following aspect:
A website implementing these best practices will look simple and clear, as shown below:
<img
src="https://docsearch.algolia.com/img/assets/recommended-layout.png"

View file

@ -52,7 +52,7 @@ Below is an example of a more complex implementation with `searchParameters`, a
```tsx
import { DocSearch } from '@docsearch/core';
import { SidepanelButton, Sidepanel } from '@docsearch/sidepanel'
import { SidepanelButton, Sidepanel } from '@docsearch/sidepanel';
function App() {
return (
@ -93,7 +93,7 @@ Sidepanel is built in a way that allows for dynamic importing of its components
```tsx
import { DocSearch } from '@docsearch/core';
import { SidepanelButton } from '@docsearch/sidepanel/button';
import type { Sidepanel as SidepanelType} from '@docsearch/sidepanel/sidepanel';
import type { Sidepanel as SidepanelType } from '@docsearch/sidepanel/sidepanel';
import { useState } from 'react';
let Sidepanel: typeof SidepanelType | null = null;

View file

@ -100,13 +100,13 @@ The side of the page which the panel will originate from.
> `type: number | string` | default: `'360px'` | **optional**
Width of the Sidepanel (px or any CSS width) while in it's default state.
Width of the Sidepanel (px or any CSS width) while in its default state.
## `expandedWidth`
> `type: number | string` | default: `'580px'` | **optional**
Width of the Sidepanel (px or any CSS width) while in it's expanded state.
Width of the Sidepanel (px or any CSS width) while in its expanded state.
## `suggestedQuestions`
@ -122,11 +122,11 @@ More information on setting up Suggested Questions can be found on [Algolia Docs
Configuration for keyboard shortcuts. Allows enabling/disabling specific shortcuts.
### Default behavior:
### Default behavior
- `Ctrl/Cmd+I` - Opens and closes the Sidepanel
### Interface:
### Interface
```ts
interface SidepanelShortcuts {

View file

@ -129,7 +129,7 @@ sidepanel({
This is just the most basic form of implementation. To learn about other implementation methods, you can read our [Advanced use cases][2].
To learn more about the different configuration options for Sidepanel, you can read our [Sidepanel API References][3]
To learn more about the different configuration options for Sidepanel, you can read our [Sidepanel API References][3].
[1]: /docs/sidepanel/hybrid
[2]: /docs/sidepanel/advanced-use-cases

View file

@ -10,11 +10,11 @@ To help you create the best search experience for your users, we provide out-of-
## Getting Started
Once approved for DocSearch, we will automatically create a Crawler on your behalf, include your URL, and the Algolia creditials for your appId, apiKey, and indexName. If we detected that you are using any of the predefined generators, we'll attempt to automatically assign the proper template that matches your generator. However, this is not gauranteed. If no specific generator is detected, we will apply the default template seen below.
Once approved for DocSearch, we will automatically create a Crawler on your behalf, include your URL, and the Algolia credentials for your appId, apiKey, and indexName. If we detect that you are using any of the predefined generators, we'll attempt to automatically assign the proper template that matches your generator. However, this is not guaranteed. If no specific generator is detected, we will apply the default template seen below.
## Updating the Template
You can manually update the crawler template by going to dashboard.algolia.com, click "Data sources", select your crawler, and go to the editor page. From there you can edit the Javascript directly. Note that you can make draft changes without saving, test the changes using the "URL Tester", and then "Save" once you're happy with your changes.
You can manually update the crawler template by going to dashboard.algolia.com, click "Data sources", select your crawler, and go to the editor page. From there you can edit the JavaScript directly. Note that you can make draft changes without saving, test the changes using the "URL Tester", and then "Save" once you're happy with your changes.
## Default Template

View file

@ -80,6 +80,8 @@ The AI runtime could not call the requested tool. This usually means the tool na
A general error occurred while streaming data from the upstream provider. This could include connection interruptions, malformed data, or provider-side streaming issues.
> **Solution:** Retry the request. If the issue persists, check your network connection and the upstream provider's status page.
### AI-212 - Invalid API key {#ai-212}
The upstream provider reported that there was an issue with the supplied API key.

View file

@ -65,7 +65,7 @@ Set up the core components of your assistant, including the language model, auth
alt="How it works"
/>
### **Define Assistant Behaviour**
### Define Assistant Behavior
Now it's time to set up the **system prompt**—this tells the LLM how it should respond using your content. The system prompt shapes your assistant's tone, style, and behavior.
@ -98,15 +98,15 @@ Or from scratch:
| :---- | :---- |
| Technical Documentation Expert | You are a helpful AI assistant embedded in a documentation website. Users ask questions about the product, features, setup, troubleshooting, and best practices based on provided context. Answer accurately and concisely using only the provided context. Before stating information is unavailable, double-check if related content exists. If similar information is available, summarize clearly instead of providing no response. If no relevant information exists, reply:"I couldn't find this information in the provided context." Always include relevant URLs when available. Avoid responses outside the provided context. |
| Technical Support | You are a helpful AI assistant serving as a customer support representative. Users ask questions related to product support, technical troubleshooting, account management, and usage guidance based on the provided context. Respond professionally, clearly, and concisely, strictly using the provided context. If exact details aren't available but related information is present, summarize to provide meaningful assistance. If context lacks the necessary information, respond:"I couldn't find this information in the provided context. Please contact our support team for further assistance." Include relevant URLs or contact details when applicable. Do not provide answers beyond the context provided. |
| Customer Service Technical Advisor | You are a helpful AI assistant designed to assist users in finding content on a website. Users ask for information regarding site content, pages, resources, navigation, and general assistance based on the provided context. Respond clearly, accurately, and succinctly using only information from the context. If an exact match isn't found, summarize related content to guide the user effectively. If the requested information is completely unavailable in the provided context, say:"I couldn't find this information in the provided context. Try refining your search or browsing our website for more details. |
| Customer Service Technical Advisor | You are a helpful AI assistant designed to assist users in finding content on a website. Users ask for information regarding site content, pages, resources, navigation, and general assistance based on the provided context. Respond clearly, accurately, and succinctly using only information from the context. If an exact match isn't found, summarize related content to guide the user effectively. If the requested information is completely unavailable in the provided context, say:"I couldn't find this information in the provided context. Try refining your search or browsing our website for more details." |
### **Manage Assistants, Prompts and Domains**
### Manage Assistants, Prompts and Domains
Now that you've created your first assistant and prompt, you can review and manage them from this screen.
* To create a new assistant, click the “Add Assistant" button.
* To create a new prompt, click the “Add Prompt" button.
* To add a new allowed domain, click “Add Domain" button
* To add a new allowed domain, click the “Add Domain” button.
* To edit or delete an existing assistant, prompt or domain, click the “⋯" (more options) icon on the right side of the corresponding row
This view gives you a centralized place to organize, reuse, and fine-tune your assistant configurations over time.

View file

@ -22,7 +22,7 @@ DocSearch is entirely free and automated. The one thing we'll need from you is t
DocSearch is [one of our ways][1] to give back to the open source community for everything it did for us already.
You can now [apply to the program][3]
You can now [apply to the program][3].
[1]: https://opencollective.com/algolia
[2]: /docs/who-can-apply