docs(v2): command for swizzling all components (#2549)

* doc(v2): Add swizzle all components doc

* Update using-themes.md

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
This commit is contained in:
Fanny 2020-04-05 15:52:46 -03:00 committed by GitHub
parent 49a2958c96
commit 6a20183a68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,7 +93,13 @@ npm run swizzle @docusaurus/theme-classic Footer
This will copy the current `<Footer />` component used by the theme to a `src/theme/Footer` directory under the root of your site, which is where Docusaurus will look for swizzled components. Docusaurus will then use swizzled component in place of the original one from the theme.
**Note**: You need to restart your dev server for Docusaurus to pick up the new component.
Although we highly discourage swizzling of all components, if you wish to do that, run:
```bash npm2yarn
npm run swizzle @docusaurus/theme-classic
```
**Note**: You need to restart your webpack dev server in order for Docusaurus to know about the new component.
## Official themes by Docusaurus