Skip to content

Commit

Permalink
Merge pull request #2 from duanmengkk/main
Browse files Browse the repository at this point in the history
add readme
  • Loading branch information
duanmengkk authored Oct 17, 2024
2 parents 30cbe07 + 660fd52 commit bf9ee2e
Show file tree
Hide file tree
Showing 14 changed files with 187 additions and 25 deletions.
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/GitlabLint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/kubenest-website.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/markdown-navigator-enh.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 55 additions & 0 deletions .idea/markdown-navigator.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 32 additions & 25 deletions README.md
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).
48 changes: 48 additions & 0 deletions README_ZH.md
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)
Binary file modified node_modules/.cache/webpack/client-development-en/0.pack
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified node_modules/.cache/webpack/client-development-en/index.pack
Binary file not shown.
Binary file not shown.

0 comments on commit bf9ee2e

Please sign in to comment.