mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 00:39:45 +02:00
docs(v2): display yarn and npm command on website (#2037)
* docs(v2): display yarn and npm command on website * more * fix div cannot be descendant p
This commit is contained in:
parent
3265dda895
commit
c533adc4aa
12 changed files with 104 additions and 29 deletions
|
@ -34,16 +34,16 @@ themeConfig: {
|
|||
|
||||
If you prefer to customize Algolia's search bar React component, swizzle the `SearchBar` component in `@docusaurus/theme-search-algolia`:
|
||||
|
||||
```bash
|
||||
yarn swizzle @docusaurus/theme-search-algolia SearchBar
|
||||
```bash npm2yarn
|
||||
npm run swizzle @docusaurus/theme-search-algolia SearchBar
|
||||
```
|
||||
|
||||
## Using your own search
|
||||
|
||||
To use your own search, swizzle the `SearchBar` component in `@docusaurus/theme-classic`
|
||||
|
||||
```bash
|
||||
yarn swizzle @docusaurus/theme-classic SearchBar
|
||||
```bash npm2yarn
|
||||
npm run swizzle @docusaurus/theme-classic SearchBar
|
||||
```
|
||||
|
||||
This will create a `src/themes/SearchBar` file in your project folder. Restart your dev server and edit the component, you will see that Docusaurus uses your own `SearchBar` component now.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue