Skip to content

Commit

Permalink
Merge pull request alibaba#6 from nacos-group/master
Browse files Browse the repository at this point in the history
Merged request- Update README.md
  • Loading branch information
caojiele authored May 29, 2019
2 parents da1756a + 4ef0d3d commit 6ea21f5
Showing 1 changed file with 32 additions and 24 deletions.
56 changes: 32 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,33 @@

This project keeps all sources used for building up [Nacos](https://github.com/alibaba/nacos) official website which's served at http://nacos.io.

## Prerequisite

## Attention
Nacos website is powered by [docsite](https://github.com/txd-team/docsite). If your version of docsite is less then `1.3.3`, please upgrade to `1.3.3`. Please also make sure your node version is 8.x, versions higher than 8.x is not supported by docsite yet.

Nacos website is powered by [docsite](https://github.com/txd-team/docsite). If your version of docsite is less then 1.3.3, please upgrade to 1.3.3. Please also make sure your node version is 8.x, versions higher than 8.x is not supported by docsite yet.
## Build instruction

> **NOTE**: `docsite` can not support the latest `node@11`, you need to install older version of `node`, for example, you can use following commands to do this on **MacOS** with `brew`
>
> ```
> brew search node
> brew install node@8
>
> install `npm` with specific node version `node@8`
> ```
>
> we tested successfully with
>
> `node 8.9.4 | npm 5.6.0 | docsite 1.3.2`
>
## Build WebSite Locally
1. Run `npm install docsite -g` to install the docsite dev tool.
2. Run `npm i` in the project's root directory to install the dependencies.
3. Run `docsite start` in the project's root directory to start a local server, you will see the website in 'http://127.0.0.1:8080'.
1. Run `npm install docsite -g` to install the dev tool.
2. Run `npm i` in the root directory to install the dependencies.
3. Run `docsite start` in the root directory to start a local server, you will see the website in 'http://127.0.0.1:8080'.
4. Run `docsite build` to build source code.
5. Verify your change locally: `python -m SimpleHTTPServer 8000`, when your python version is 3 use :`python3 -m http.server 8000` instead.

If you have higher version of node installed, you may consider `nvm` to allow different versions of `node` coexisting on your machine.

1. Follow the [instructions](http://nvm.sh) to install nvm
2. Run `nvm install v8.16.0` to install node v8
3. Run `nvm use v8.16.0` to switch the working environment to node v8
4. Run `npm install docsite -g`

## How to Contribute

1. Create an issue first to description the issue
2. Do not use `git add .` to commit all the changes.
3. Just push your changed files, such as:
* *.md
* `*.md`
* blog.js or docs.js or site.js
4. Send a PR to `develop` branch.
4. Send a PR to `master` branch.

## SEO

Expand All @@ -51,3 +42,20 @@ description: some description
---
```

Refer to [this blog](/blog/zh-cn/nacos.md)

## Guide for adding new document

### Add a new blog

1. Add new .md file under blog/en-us or blog/zh-cn.
2. Update site_config/blog.js, add a new entry to the blog in either en-us or zh-cn.
3. Run docsite start locally to verify the blog can be displayed correctly.
4. Send the pull request contains the .md and blog.js only.

### Add a new article for developers

1. Add new .md file under docs/en-us/developers or docs/zh-cn/developers, the file name should end up with _dev.md. Note that the suffix _dev is necessary.
2. Update site_config/develop.js, add a new entry in either en-us or zh-cn.
3. Run docsite start locally to verify the article can be displayed correctly.
4. Send the pull request contains the *_dev.md and develop.js only.

0 comments on commit 6ea21f5

Please sign in to comment.