Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(v2): remind running clear after swizzling #5044

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions website/docs/using-themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ 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 webpack dev server in order for Docusaurus to know about the new component. You may also need to clear the cache by running `npm run clear` or `yarn clear` after terminating the current process.

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.

## Wrapping theme components {#wrapping-theme-components}

Sometimes, you just want to wrap an existing theme component with additional logic, and it can be a pain to have to maintain an almost duplicate copy of the original theme component.
Expand Down