From dcd881839962122deabd0330bcb8e9b336407d2a Mon Sep 17 00:00:00 2001
From: Nikolay Vitkov <34244704+Lightning00Blade@users.noreply.github.com>
Date: Wed, 29 Mar 2023 11:37:35 +0200
Subject: [PATCH] docs: fix website (#9935)
---
README.md | 6 +++---
docs/faq.md | 2 +-
docs/guides/configuration.mdx | 2 +-
docs/guides/debugging.md | 14 +++++++-------
docs/index.md | 6 +++---
website/src/theme/SearchBar/index.js | 10 ++++++----
website/src/theme/SearchPage/index.js | 8 +++-----
7 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/README.md b/README.md
index 451fe99e107..4f2b49be99e 100644
--- a/README.md
+++ b/README.md
@@ -107,8 +107,8 @@ or [managing browsers yourself](https://pptr.dev/api/puppeteer.browserfetcher).
If you are managing browsers yourself, you will need to call
[`puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch) with
an an explicit
-[`executablePath`](https://pptr.dev/api/puppeteer.launchoptions.executablepath)
-(or [`channel`](https://pptr.dev/api/puppeteer.launchoptions.channel) if it's
+[`executablePath`](https://pptr.dev/api/puppeteer.launchoptions)
+(or [`channel`](https://pptr.dev/api/puppeteer.launchoptions) if it's
installed in a standard location).
When using `puppeteer-core`, remember to change the import:
@@ -177,7 +177,7 @@ import puppeteer from 'puppeteer';
Puppeteer launches Chromium in
[headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome).
To launch a full version of Chromium, set the
-[`headless`](https://pptr.dev/api/puppeteer.browserlaunchargumentoptions.headless)
+[`headless`](https://pptr.dev/api/puppeteer.browserlaunchargumentoptions)
option when launching a browser:
```ts
diff --git a/docs/faq.md b/docs/faq.md
index 41eec4d3021..d063ff336f9 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -193,7 +193,7 @@ There are two reasons for this:
This means that Puppeteer does not support licensed formats such as AAC or
H.264. (However, it is possible to force Puppeteer to use a
separately-installed version Chrome instead of Chromium via the
- [`executablePath` option to `puppeteer.launch`](./api/puppeteer.launchoptions.executablepath).
+ [`executablePath` option to `puppeteer.launch`](./api/puppeteer.launchoptions).
You should only use this configuration if you need an official release of
Chrome that supports these media formats.)
- Since Puppeteer (in all configurations) controls a desktop version of
diff --git a/docs/guides/configuration.mdx b/docs/guides/configuration.mdx
index a9fd3885cff..c6e11edda6b 100644
--- a/docs/guides/configuration.mdx
+++ b/docs/guides/configuration.mdx
@@ -81,7 +81,7 @@ about the ambient environment is needed (in this case, `__dirname`).
#### Enabling experiments
By default, experiments are turned off, but they can be individually turned on
-using the [`experiments`](../api/puppeteer.configuration.experiments) key.
+using the [`experiments`](../api/puppeteer.configuration) key.
For example, if you want to enable ARM-native macOS chromium, you can use
diff --git a/docs/guides/debugging.md b/docs/guides/debugging.md
index 17c64bbba5b..9b41c80906e 100644
--- a/docs/guides/debugging.md
+++ b/docs/guides/debugging.md
@@ -23,13 +23,13 @@ before
These methods can be used to debug any situation. These should be used as a
quick sanity check before diving into more complex methods.
-### Turn off [`headless`](../api/puppeteer.browserlaunchargumentoptions.headless)
+### Turn off [`headless`](../api/puppeteer.browserlaunchargumentoptions)
Sometimes it's useful to see what the browser is displaying. Instead of
launching in
-[`headless`](../api/puppeteer.browserlaunchargumentoptions.headless) mode,
+[`headless`](../api/puppeteer.browserlaunchargumentoptions) mode,
launch a full version of the browser with
-[`headless`](../api/puppeteer.browserlaunchargumentoptions.headless) set to
+[`headless`](../api/puppeteer.browserlaunchargumentoptions) set to
`false`:
```ts
@@ -38,7 +38,7 @@ const browser = await puppeteer.launch({headless: false});
### Puppeteer "slow-mo"
-The [`slowMo`](../api/puppeteer.browserconnectoptions.slowmo) option slows down
+The [`slowMo`](../api/puppeteer.browserconnectoptions) option slows down
Puppeteer operations by a specified amount of milliseconds. It's another way to
help see what's going on.
@@ -55,7 +55,7 @@ const browser = await puppeteer.launch({
Since client code runs in the browser, doing `console.*` in client code will not
directly log to Node.js. However, you can [listen](../api/puppeteer.page.on) for
-the [`console`](../api/puppeteer.pageeventobject.console) event which returns a
+the [`console`](../api/puppeteer.pageeventobject) event which returns a
payload with the logged text.
```ts
@@ -66,7 +66,7 @@ await page.evaluate(() => console.log(`url is ${location.href}`));
### Use the debugger in the browser
-1. Set [`devtools`](../api/puppeteer.browserlaunchargumentoptions.devtools) to
+1. Set [`devtools`](../api/puppeteer.browserlaunchargumentoptions) to
`true` when launching Puppeteer:
```ts
@@ -98,7 +98,7 @@ to this
[Chromium bug](https://bugs.chromium.org/p/chromium/issues/detail?id=833928), so
if you want to try something out, you have to add it to your test file.
-1. Set [`headless`](../api/puppeteer.browserlaunchargumentoptions.headless) to
+1. Set [`headless`](../api/puppeteer.browserlaunchargumentoptions) to
`false`.
2. Add `debugger` to any server code you want debugged. For example,
diff --git a/docs/index.md b/docs/index.md
index 451fe99e107..4f2b49be99e 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -107,8 +107,8 @@ or [managing browsers yourself](https://pptr.dev/api/puppeteer.browserfetcher).
If you are managing browsers yourself, you will need to call
[`puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch) with
an an explicit
-[`executablePath`](https://pptr.dev/api/puppeteer.launchoptions.executablepath)
-(or [`channel`](https://pptr.dev/api/puppeteer.launchoptions.channel) if it's
+[`executablePath`](https://pptr.dev/api/puppeteer.launchoptions)
+(or [`channel`](https://pptr.dev/api/puppeteer.launchoptions) if it's
installed in a standard location).
When using `puppeteer-core`, remember to change the import:
@@ -177,7 +177,7 @@ import puppeteer from 'puppeteer';
Puppeteer launches Chromium in
[headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome).
To launch a full version of Chromium, set the
-[`headless`](https://pptr.dev/api/puppeteer.browserlaunchargumentoptions.headless)
+[`headless`](https://pptr.dev/api/puppeteer.browserlaunchargumentoptions)
option when launching a browser:
```ts
diff --git a/website/src/theme/SearchBar/index.js b/website/src/theme/SearchBar/index.js
index 4bfb7a9b275..1b3201bd6ce 100644
--- a/website/src/theme/SearchBar/index.js
+++ b/website/src/theme/SearchBar/index.js
@@ -3,8 +3,10 @@ import Head from '@docusaurus/Head';
import Link from '@docusaurus/Link';
import {useHistory} from '@docusaurus/router';
import {isRegexpStringMatch} from '@docusaurus/theme-common';
-import {useContextualSearchFilters} from '@docusaurus/theme-common';
-import {useSearchPage} from '@docusaurus/theme-common/internal';
+import {
+ useContextualSearchFilters,
+ useSearchLinkCreator,
+} from '@docusaurus/theme-common';
import Translate from '@docusaurus/Translate';
import {useBaseUrlUtils} from '@docusaurus/useBaseUrl';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
@@ -19,9 +21,9 @@ function Hit({hit, children}) {
return {children};
}
function ResultsFooter({state, onClose}) {
- const {generateSearchPageLink} = useSearchPage();
+ const createSearchLink = useSearchLinkCreator();
return (
-
+