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:
Endi 2019-11-24 09:32:26 +07:00 committed by Yangshun Tay
parent 3265dda895
commit c533adc4aa
12 changed files with 104 additions and 29 deletions

View file

@ -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.