Publish changes to start args to npm

This commit is contained in:
Frank Li 2017-07-13 15:09:52 -07:00
parent 5058e765c3
commit 70ed75b046
3 changed files with 20 additions and 5 deletions

View file

@ -140,8 +140,10 @@ yarn run start
```
This will start a server hosting your website locally at `localhost:3000`. This server will ignore any occurences `siteConfig.baseUrl` in URLs, e.g. `localhost:3000/your-site/index.html` will be the same as `localhost:3000/index.html`. Any changes to configured files will be reflected by refreshing the page, i.e. the server does not need to be restarted to show changes. You may also specify a different port to start your server on as a command line argument, e.g. `npm run start 9000`.
This will start a server hosting your website locally at `localhost:3000`. This server will ignore any occurences `siteConfig.baseUrl` in URLs, e.g. `localhost:3000/your-site/index.html` will be the same as `localhost:3000/index.html`. Any changes to configured files will be reflected by refreshing the page, i.e. the server does not need to be restarted to show changes. You may also specify a different port to start your server on by using a `--port` flag:
```
npm run start -- --port 9000
```
### Build Static Pages

View file

@ -13,6 +13,17 @@ next: translation
In your project repo, all of your documentation files should be placed inside a `docs` folder. Any blog posts should be inside a `blog` folder. Create a `website` folder inside which you will install and run docusaurus.
Example project structure:
```
project-repo/
blog/
2017-05-06-blog-post.md
docs/
en/
doc1.md
website/
```
### Installation
Inside of your `website` folder, create a `package.json` file with the following scripts for Docusaurus:
@ -136,8 +147,10 @@ yarn run start
```
This will start a server hosting your website locally at `localhost:3000`. This server will ignore any occurences `siteConfig.baseUrl` in URLs, e.g. `localhost:3000/your-site/index.html` will be the same as `localhost:3000/index.html`. Any changes to configured files will be reflected by refreshing the page, i.e. the server does not need to be restarted to show changes. You may also specify a different port to start your server on as a command line argument, e.g. `npm run start 9000`.
This will start a server hosting your website locally at `localhost:3000`. This server will ignore any occurences `siteConfig.baseUrl` in URLs, e.g. `localhost:3000/your-site/index.html` will be the same as `localhost:3000/index.html`. Any changes to configured files will be reflected by refreshing the page, i.e. the server does not need to be restarted to show changes. You may also specify a different port to start your server on by using a `--port` flag:
```
npm run start -- --port 9000
```
### Build Static Pages

View file

@ -21,7 +21,7 @@
"shelljs": "^0.7.8"
},
"name": "docusaurus",
"version": "1.0.0-alpha.14",
"version": "1.0.0-alpha.15",
"bin": {
"docusaurus-start": "./lib/start-server.js",
"docusaurus-build": "./lib/build-files.js",