-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
add readme
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,48 @@ | ||
# Website | ||
> English | [中文](README_ZH.md) | ||
> | ||
# Kosmos Docs & Website | ||
|
||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. | ||
This repo contains the source code of [KubeNest website](https://kosmos-io.github.io/kubenest-website/) and all the docs for Kosmos. | ||
It's built by [Docusaurus](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
- [KubeNest website](https://kosmos-io.github.io/kubenest-website) | ||
- [KubeNest docs](https://kosmos-io.github.io/kubenest-website/getting-started/introduction) | ||
|
||
``` | ||
$ yarn | ||
``` | ||
Welcome to join us, and you are more than appreciated to contribute! | ||
|
||
### Local Development | ||
## Add or Update Docs | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
When you add or modify the docs, these two files(`docs/` and `i18n/zh-Hans/docusaurus-plugin-content-docs/current`) should be taken into consideration. | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
## Run with Node.js | ||
|
||
### Build | ||
If you have the Node.js environment, you can run the website locally. | ||
|
||
``` | ||
$ yarn build | ||
- It is recommended to use version node v18.0.0+ and npm v8.6+ | ||
- You can download [Node.js](https://nodejs.org/download/release/v18.0.0) | ||
|
||
```shell | ||
# Clone the repo, or your own fork | ||
git clone https://github.com/<YOUR_GITHUB_USERNAME>/website.git | ||
|
||
# build | ||
yarn | ||
|
||
# Start the site | ||
yarn start | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
Once the site is running locally, you can preview the site by visiting [http://localhost:3000/](http://localhost:3000/). | ||
|
||
### Deployment | ||
## How to Submit Documentation to this repo | ||
|
||
Using SSH: | ||
The default documentation language for the project is English. | ||
|
||
``` | ||
$ USE_SSH=true yarn deploy | ||
``` | ||
- English documentation submission path: `./docs` | ||
- Chinese documentation submission path: `./i18n/zh-Hans/docusaurus-plugin-content-docs/current` | ||
|
||
Not using SSH: | ||
Note: The directory structures for both Chinese and English documentation must be completely identical. | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> yarn deploy | ||
``` | ||
## Send your pull request | ||
|
||
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. | ||
After all changes checked well, please [creating a pull request](https://help.github.com/en/articles/creating-a-pull-request) with [DCO](https://github.com/apps/dco). |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
> [English](README.md) | 中文 | ||
# Kosmos 文档与网站 | ||
|
||
这个仓库包含了[KubeNest 网站](https://kosmos-io.github.io/kubenest-website/)的源代码以及所有的 Kosmos 文档。 | ||
它是由[Docusaurus](https://docusaurus.io/)构建的,一个现代的静态网站生成器。 | ||
|
||
- [KubeNest 网站](https://kosmos-io.github.io/kubenest-website/) | ||
- [KubeNest 文档](https://kosmos-io.github.io/kubenest-website/getting-started/introduction) | ||
|
||
欢迎加入我们,非常感谢您的贡献! | ||
|
||
## 添加或更新文档 | ||
|
||
当您添加或修改文档时,应该考虑这两个文件夹([`docs/`](command:_github.copilot.openRelativePath?%5B%7B%22scheme%22%3A%22file%22%2C%22authority%22%3A%22%22%2C%22path%22%3A%22%2FUsers%2Fduanmeng%2FCode%2Fgithub2%2Fwebsite%2Fdocs%2F%22%2C%22query%22%3A%22%22%2C%22fragment%22%3A%22%22%7D%5D "/Users/duanmeng/Code/github2/website/docs/") 和 [`i18n/zh-Hans/docusaurus-plugin-content-docs/current`](command:_github.copilot.openRelativePath?%5B%7B%22scheme%22%3A%22file%22%2C%22authority%22%3A%22%22%2C%22path%22%3A%22%2FUsers%2Fduanmeng%2FCode%2Fgithub2%2Fwebsite%2Fi18n%2Fzh-Hans%2Fdocusaurus-plugin-content-docs%2Fcurrent%22%2C%22query%22%3A%22%22%2C%22fragment%22%3A%22%22%7D%5D "/Users/duanmeng/Code/github2/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current"))。 | ||
|
||
## 使用 Node.js 运行 | ||
|
||
如果您有 Node.js 环境,可以在本地运行该网站。 | ||
|
||
- 推荐使用 Node.js v18.0.0+ 和 npm v8.6+ | ||
- 您可以下载 [Node.js](https://nodejs.org/download/release/v18.0.0) | ||
|
||
```shell | ||
# 克隆仓库,或克隆您自己的分叉 | ||
git clone https://github.com/<YOUR_GITHUB_USERNAME>/website.git | ||
|
||
# 构建 | ||
yarn | ||
|
||
# 启动网站 | ||
yarn start | ||
``` | ||
|
||
一旦网站在本地运行,您可以通过访问 [http://localhost:3000/](http://localhost:3000/) 预览网站。 | ||
|
||
## 如何提交文档到这个仓库 | ||
|
||
该项目的默认文档语言是英语。 | ||
|
||
- 英文文档提交路径:[`./docs`](command:_github.copilot.openRelativePath?%5B%7B%22scheme%22%3A%22file%22%2C%22authority%22%3A%22%22%2C%22path%22%3A%22%2FUsers%2Fduanmeng%2FCode%2Fgithub2%2Fwebsite%2Fdocs%22%2C%22query%22%3A%22%22%2C%22fragment%22%3A%22%22%7D%5D "/Users/duanmeng/Code/github2/website/docs") | ||
- 中文文档提交路径:[`./i18n/zh-Hans/docusaurus-plugin-content-docs/current`](command:_github.copilot.openRelativePath?%5B%7B%22scheme%22%3A%22file%22%2C%22authority%22%3A%22%22%2C%22path%22%3A%22%2FUsers%2Fduanmeng%2FCode%2Fgithub2%2Fwebsite%2Fi18n%2Fzh-Hans%2Fdocusaurus-plugin-content-docs%2Fcurrent%22%2C%22query%22%3A%22%22%2C%22fragment%22%3A%22%22%7D%5D "/Users/duanmeng/Code/github2/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current") | ||
|
||
注意:中文和英文文档的目录结构必须完全相同。 | ||
|
||
## 发送您的拉取请求 | ||
|
||
在检查所有更改后,请[创建一个拉取请求](https://help.github.com/en/articles/creating-a-pull-request)并附上[DCO](https://github.com/apps/dco)。 |