-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(v2): guide on upgrading Docusaurus within a project (#2338)
* Update installation.md Add information on how to update/upgrade the version of Docusaurus * Update installation.md * Update installation.md * Update installation.md Co-authored-by: Yangshun Tay <[email protected]>
- Loading branch information
1 parent
6670c53
commit baed4fa
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,6 +97,38 @@ npm run build | |
|
||
and contents will be generated within the `/build` directory, which can be copied to any static file hosting service like [GitHub pages](https://pages.github.com/), [Now](https://zeit.co/now) or [Netlify](https://www.netlify.com/). Check out the docs on [deployment](deployment.md) for more details. | ||
|
||
## Updating your Docusaurus version | ||
|
||
There are many ways to update your Docusaurus version. One guaranteed way is to manually change the version number in `package.json` to the desired version. Note that all `@docusaurus/`-namespaced packages should be using the same version. | ||
|
||
```json | ||
"dependencies": { | ||
"@docusaurus/core": "^2.0.0-alpha.43", | ||
"@docusaurus/preset-classic": "^2.0.0-alpha.43", | ||
... | ||
} | ||
``` | ||
|
||
Then, in the directory containing `package.json`, run your package manager's install command: | ||
|
||
```bash npm2yarn | ||
npm install | ||
``` | ||
|
||
To check that that the update occurred successfully, run: | ||
|
||
```bash npm2yarn | ||
npm docusaurus --version | ||
``` | ||
|
||
You should see the correct version as output. | ||
|
||
Alternatively, if you are using Yarn, you can do: | ||
|
||
``` | ||
yarn upgrade @docusaurus/[email protected] @docusaurus/[email protected] | ||
``` | ||
|
||
## Problems? | ||
|
||
Ask for help on [Stack Overflow](https://stackoverflow.com/questions/tagged/docusaurus), on our [GitHub repository](https://github.com/facebook/docusaurus) or [Twitter](https://twitter.com/docusaurus). |