Merge pull request #348 from martyav/readme-update

Updated Docusaurus install instructions in README
This commit is contained in:
Billy Tat
2022-12-16 10:07:02 -08:00
committed by GitHub
+15 -28
View File
@@ -1,51 +1,38 @@
# Website
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
The Rancher Docs website is built with [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
### Installation
## Installation
The Rancher Docs repository already contains a yarn.lock file, which contains the dependencies you need to build the website.
1. If you haven't already, install [Node](https://nodejs.org/en/download/) and [Yarn](https://yarnpkg.com/getting-started/install).
1. Fork and clone the rancher-docs repository.
1. Go into your local rancher-docs folder.
1. Run `yarn` to install Docusaurus and associated dependencies.
## Local Development
```
$ yarn
```
### Local Development
```
$ yarn start
yarn start
```
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
You can also use Docker to launch the website without needing to install and configure yarn:
You can also use Docker to launch the website without needing to install and configure Yarn:
```
docker run --rm -it -v $PWD:$PWD -w $PWD -p 3000:3000 node yarn start -h 0.0.0.0
```
### Build
## Build
```
$ yarn build
yarn build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
### Deployment
Using SSH:
```
$ USE_SSH=true yarn deploy
```
Not using SSH:
```
$ GIT_USER=<Your GitHub username> yarn deploy
```
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
License
=======
Copyright (c) 2014-2022 [Rancher Labs, Inc.](https://rancher.com)