1
0
Fork 0

docs: fix images and remove v2 mentions (#1320)

This commit is contained in:
Clément Vannicatte 2022-03-01 14:29:37 +01:00 committed by GitHub
parent f2ce476c8b
commit e5df49173e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 1426 additions and 1130 deletions

View file

@ -2,12 +2,6 @@
title: Manage your crawls
---
:::info
The following content is for **[the new DocSearch infrastructure](/docs/migrating-from-legacy)**. If you haven't received an email to migrate your account yet, please refer to the **[legacy](/docs/legacy/dropdown)** documentation.
:::
import useBaseUrl from '@docusaurus/useBaseUrl';
DocSearch comes with the [Algolia Crawler web interface](https://crawler.algolia.com/) that allows you to configure how and when your Algolia index will be populated.

View file

@ -1,5 +1,5 @@
---
title: Migrating from legacy
title: Migrating from the legacy scraper
---
import Tabs from '@theme/Tabs';
@ -7,7 +7,7 @@ import TabItem from '@theme/TabItem';
## Introduction
With this new version of the [DocSearch UI][1], we wanted to go further and provide better tooling for you to create and maintain your config file, and some extra Algolia features that you all have been requesting for a long time!
With the new version of the [DocSearch UI][1], we wanted to go further and provide better tooling for you to create and maintain your config file, and some extra Algolia features that you all have been requesting for a long time!
## What's new?

View file

@ -0,0 +1,24 @@
---
title: Migrating from DocSearch v2
---
This page lists the differences between the [DocSearch v2](/docs/legacy/dropdown) and [DocSearch v3](/docs/DocSearch-v3) API, you can also take a look at [the exhaustive `API reference` list](/docs/api) and [the `Getting started` guide](/docs/DocSearch-v3).
```diff
docsearch({
indexName: 'YOUR_INDEX_NAME',
apiKey: 'YOUR_SEARCH_API_KEY',
- inputSelector: '<YOUR_CSS_INPUT_SELECTOR>',
+ container: '<YOUR_CSS_CONTAINER_SELECTOR>', -> We now require a container to be provided
- appId: '<YOUR_OPTIONAL_APP_ID>',
+ appId: '<YOUR_REQUIRED_APP_ID>', -> `appId` is now required
- transformData: function(hits) {},
+ transformItems: function(items) {},
- algoliaOptions: {},
+ searchParameters: {},
});
```

View file

@ -2,12 +2,6 @@
title: Record Extractor
---
:::info
The following content is for **[the new DocSearch infrastructure](/docs/migrating-from-legacy)**. If you haven't received an email to migrate your account yet, please refer to the **[legacy](/docs/legacy/dropdown)** documentation.
:::
## Introduction
:::info

View file

@ -2,12 +2,6 @@
title: Config templates
---
:::info
The following content is for **[the new DocSearch infrastructure](/docs/migrating-from-legacy)**. If you haven't received an email to migrate your account yet, please refer to the **[legacy](/docs/legacy/dropdown)** documentation.
:::
import useBaseUrl from '@docusaurus/useBaseUrl';
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]

View file

@ -18,8 +18,8 @@
"dependencies": {
"@algolia/ui-library": "4.0.0-beta.71",
"@docsearch/react": "3.0.0",
"@docusaurus/core": "2.0.0-beta.15",
"@docusaurus/preset-classic": "2.0.0-beta.15",
"@docusaurus/core": "2.0.0-beta.16",
"@docusaurus/preset-classic": "2.0.0-beta.16",
"@mdx-js/react": "1.6.22",
"clsx": "1.1.1",
"file-loader": "6.2.0",

View file

@ -19,7 +19,7 @@ module.exports = {
{
type: 'category',
label: 'DocSearch v3',
items: ['DocSearch-v3', 'api', 'styling'],
items: ['DocSearch-v3', 'api', 'styling', 'migrating-from-v2'],
},
{
type: 'category',

View file

@ -413,8 +413,12 @@ function Home() {
<div className="mt-10 -mx-4 lg:mt-0 uil-ta-center">
<img
className="relative mx-auto"
src={withBaseUrl('img/assets/docsearch-shadow.png')}
className="relative mx-auto rounded-lg shadow-lg image-rendering-crisp"
src={withBaseUrl(
`img/assets/${
isDarkTheme ? 'docsearch-shadow-dark' : 'docsearch-shadow'
}.png`
)}
alt="docsearch-modal"
/>
</div>
@ -662,7 +666,7 @@ function Home() {
</p>
<div className="pt-12 items-center justify-center flex">
<img
className="w-full max-w-4xl"
className="w-full max-w-4xl image-rendering-pixel"
src={withBaseUrl('img/assets/keyboard.png')}
alt="keyboard-shortcuts"
/>

View file

@ -159,6 +159,18 @@ html[data-theme='dark'] .header-github-link:before {
no-repeat;
}
/* Images */
.image-rendering-crisp {
image-rendering: crisp-edges;
/* alias for google chrome */
image-rendering: -webkit-optimize-contrast;
}
.image-rendering-pixel {
image-rendering: pixelated;
}
/* Tailwindcss */
#tailwind dd,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 830 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 116 KiB

View file

@ -5,12 +5,6 @@ sidebar_label: Behavior
:::caution
The following snippets are for **[DocSearch (v2)](https://github.com/algolia/docsearch/tree/master)**. We recommend using the latest version: **[DocSearch v3](/docs/DocSearch-v3)**.
:::
:::caution
The following references to **[Autocomplete.js](https://github.com/algolia/autocomplete/tree/master)** are outdated. If you would like to try the latest version, please visit the **[Autocomplete documentation](https://www.algolia.com/doc/ui-libraries/autocomplete/introduction/what-is-autocomplete/)**
:::

View file

@ -4,12 +4,6 @@ title: Dropdown Search-UI
Once your Algolia DocSearch index is ready, set up, and filled with the right data, you will need to integrate our dedicated Search-UI. To add the dropdown of results below your search input, you'll have to include our DocSearch library into your website as per the following example.
:::caution
The following snippets are for **[DocSearch (v2)](https://github.com/algolia/docsearch/tree/master)**. We recommend using the latest version: **[DocSearch v3](/docs/DocSearch-v3)**.
:::
```html
<!-- Before the closing </head> -->
<link

View file

@ -4,12 +4,6 @@ title: Styling DocSearch
import useBaseUrl from '@docusaurus/useBaseUrl';
:::caution
The following documentation is for **[DocSearch (v2)](https://github.com/algolia/docsearch/tree/master)**. We recommend using the latest version: **[DocSearch v3](/docs/DocSearch-v3)**.
:::
DocSearch default color scheme comes in a grey theme with blue highlight.
## Colorscheme

2464
yarn.lock

File diff suppressed because it is too large Load diff