You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then open [http://localhost:3000/](http://localhost:3000/) to see your site.<br>
38
38
When you’re ready to deploy to production, create a minified bundle with `npm run build`.
39
39
40
-
## Creating a Site
40
+
## Creating a new Site
41
41
42
42
**You’ll need to have Node 14.0.0 or later version on your local development machine** (but it’s not required on the server). We recommend using the latest LTS version. You can use [nvm](https://github.com/creationix/nvm#installation) (macOS/Linux) or [nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows) to switch Node versions between different projects.
43
43
44
44
To create a new site, you may choose one of the following methods:
45
45
46
-
### npx
46
+
-### npx
47
47
48
-
```sh
49
-
npx create-docusaurus-openapi my-website
50
-
```
48
+
```sh
49
+
npx create-docusaurus-openapi my-website
50
+
```
51
51
52
-
_([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) is a package runner tool that comes with npm 5.2+ and higher)_
52
+
_([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) is a package runner tool that comes with npm 5.2+ and higher)_
53
53
54
-
### npm
54
+
-### npm
55
55
56
-
```sh
57
-
npm init docusaurus-openapi my-website
58
-
```
56
+
```sh
57
+
npm init docusaurus-openapi my-website
58
+
```
59
59
60
-
_`npm init <initializer>` is available in npm 6+_
60
+
_`npm init <initializer>` is available in npm 6+_
61
61
62
-
### Yarn
62
+
-### yarn
63
63
64
-
```sh
65
-
yarn create docusaurus-openapi my-website
66
-
```
64
+
```sh
65
+
yarn create docusaurus-openapi my-website
66
+
```
67
67
68
-
_[`yarn create <starter-kit-package>`](https://yarnpkg.com/lang/en/docs/cli/create/) is available in Yarn 0.25+_
68
+
_[`yarn create <starter-kit-package>`](https://yarnpkg.com/lang/en/docs/cli/create/) is available in Yarn 0.25+_
69
69
70
70
It will create a directory called `my-website` inside the current folder.<br>
71
71
Inside that directory, it will generate the initial project structure and install the transitive dependencies:
@@ -124,6 +124,37 @@ Builds the site for production to the `build` folder.
124
124
125
125
Docusaurus is a modern static website generator that will build the website into a directory of static contents, which can be copied to any static file hosting service like [GitHub pages](https://pages.github.com/), [Vercel](https://vercel.com/) or [Netlify](https://www.netlify.com/).
126
126
127
+
## Add to an existing Site
128
+
129
+
1. Install the dependency
130
+
131
+
```sh
132
+
npm install docusaurus-preset-openapi
133
+
```
134
+
135
+
2. Edit your `docusaurus.config.js` file to use this preset
0 commit comments