From 68384da8e001a03ce55a5f5c6fbe303746818680 Mon Sep 17 00:00:00 2001 From: martyav Date: Thu, 15 Dec 2022 14:24:04 -0500 Subject: [PATCH 1/3] updated Docusaurus install instructions --- README.md | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 9895a3253a9..6cb4b8bfeea 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,52 @@ # 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 + +Docusaurus requires [Node](https://nodejs.org/en/) and [Yarn](https://yarnpkg.com/). + +1. [Install](https://nodejs.org/en/download/) Node. +1. [Install](https://yarnpkg.com/getting-started/install) Yarn. +1. Go into your local rancher-docs repo folder. +1. Run `yarn add docusaurus` to finish installation. + +> **NOTE:** Although the official Docusaurus 2 documentation states that you should run `npx create-docusaurus@latest my-website classic`, this isn't necessary. The repo already contains all the files Docusaurus needs to build the Rancher Docs website. + +## 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 +## Deployment Using SSH: ``` -$ USE_SSH=true yarn deploy +USE_SSH=true yarn deploy ``` Not using SSH: ``` -$ GIT_USER= yarn deploy +GIT_USER= 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. From 6b7eeac7ed31e4be04c7a56054e03a9fd57099b1 Mon Sep 17 00:00:00 2001 From: martyav Date: Fri, 16 Dec 2022 10:34:29 -0500 Subject: [PATCH 2/3] updated instructions per review, rm'd Deployment section of README --- README.md | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 6cb4b8bfeea..9dc4b61666a 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,12 @@ The Rancher Docs website is built with [Docusaurus 2](https://docusaurus.io/), a ## Installation -Docusaurus requires [Node](https://nodejs.org/en/) and [Yarn](https://yarnpkg.com/). +The Rancher Docs repository already contains a yarn.lock file, which contains the dependencies you need to build the website. -1. [Install](https://nodejs.org/en/download/) Node. -1. [Install](https://yarnpkg.com/getting-started/install) Yarn. -1. Go into your local rancher-docs repo folder. -1. Run `yarn add docusaurus` to finish installation. - -> **NOTE:** Although the official Docusaurus 2 documentation states that you should run `npx create-docusaurus@latest my-website classic`, this isn't necessary. The repo already contains all the files Docusaurus needs to build the Rancher Docs 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 @@ -35,22 +33,6 @@ 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= 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) From dab2ba55c47d747234cd70e50db483cda29177b3 Mon Sep 17 00:00:00 2001 From: Marty Hernandez Avedon Date: Fri, 16 Dec 2022 10:37:01 -0500 Subject: [PATCH 3/3] minor typo - missing ( --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9dc4b61666a..a5793116fcd 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The Rancher Docs website is built with [Docusaurus 2](https://docusaurus.io/), a 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. 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.