You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: updating the templates page
The templates page needs some work. The first thing I saw is that it alluded to being able to create a crawler. As a docsearch user, this is confusing. We automatically create a crawler for the user, additional crawlers get confusing for the user.
Provide additional information about updating templates, as we're talking about templates here.
Verify the current templates, I see the default one isn't quite right.
Given that we use the same template for Docusaurus v2 and v3 combine those.
Add the Starlight template.
* Combined Docusaurus v2 and v3 templates
Its confusing to have two separate sections that are exactly the same
* added astro starlight template
* remove pkgdown and add starlight
pkgdown no longer references Algolia
added starlight as an integration partner
Copy file name to clipboardExpand all lines: packages/website/docs/templates.mdx
+49-42Lines changed: 49 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,22 @@
1
1
---
2
-
title: Config templates
2
+
title: Config Templates
3
3
---
4
4
5
5
importuseBaseUrlfrom'@docusaurus/useBaseUrl';
6
6
7
-
To help you create the best search experience for your users, we provide config templates for multiple websites generators. If you'd like to add a new template to our list, or believe we should update an existing one, please [send us an email][1] or [open a pull request][2].
7
+
To help you create the best search experience for your users, we provide out-of-the-box crawler config templates for multiple websites generators. If you'd like to add a new template to our list, or believe we should update an existing one, please [let us know on Discord][1] or [open a pull request][2].
8
8
9
-
> If you want to better understand the default parameters of the configs below, you can take a look at the [Crawler documentation](https://www.algolia.com/doc/tools/crawler/apis/configuration/).
9
+
> If you want to better understand the default parameters of the configs below, take a look at the [Crawler documentation](https://www.algolia.com/doc/tools/crawler/apis/configuration/).
10
10
11
-
## From the Crawler UI
11
+
## Getting Started
12
12
13
-
Templates are available when you [create a new Crawler](https://crawler.algolia.com/admin/crawlers/create). They will automatically be filled with your website URL, Algolia credentials and index name.
13
+
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.
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.
21
18
22
-
## Default template
19
+
## Default Template
23
20
24
21
<details><summary>default.js</summary>
25
22
<div>
@@ -119,7 +116,7 @@ new Crawler({
119
116
</div>
120
117
</details>
121
118
122
-
## Docusaurus v1 template
119
+
## Docusaurus v1 Template
123
120
124
121
<details><summary>docusaurus-v1.js</summary>
125
122
<div>
@@ -275,7 +272,7 @@ new Crawler({
275
272
</div>
276
273
</details>
277
274
278
-
## Docusaurus v2 template
275
+
## Docusaurus v2 & v3 Template
279
276
280
277
<details><summary>docusaurus-v2.js</summary>
281
278
<div>
@@ -389,9 +386,9 @@ new Crawler({
389
386
</div>
390
387
</details>
391
388
392
-
## Docusaurus v3 template
389
+
## Astro Starlight Template
393
390
394
-
<details><summary>docusaurus-v3.js</summary>
391
+
<details><summary>starlight.js</summary>
395
392
<div>
396
393
397
394
```js
@@ -409,31 +406,47 @@ new Crawler({
409
406
indexName:'YOUR_INDEX_NAME',
410
407
pathsToMatch: ['https://YOUR_WEBSITE_URL/**'],
411
408
recordExtractor: ({ $, helpers }) => {
412
-
//priority order: deepest active sub list header -> navbar active item -> 'Documentation'
0 commit comments